나 자바 안해봐서 잘 모르니까

표준입출력 같은거 좀 이상해도 봐줘

니코드 살짝 수정함


리스트를 쓸 이유가 전혀 없음

그냥 입력 받을때마다 검사해서 출력하면 간단함

백준 돌려봤는데 통과했음 ㅇㅇ


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
       
        while(true) {

           int i = sc.nextInt();
           int j = sc.nextInt();
           
           if(i + j == 0){
               break;
           } else {
               System.out.print(i+j);
           }
        }      

    }
}