본문 바로가기
카테고리 없음

10952번 A + B -5 -자바JAVA, 파이썬(Python)

by udeserveit1 2024. 7. 30.

 

 

 

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));


        while(true){
            String str = br.readLine();
            int a = Integer.parseInt(str.split(" ")[0]);
            int b = Integer.parseInt(str.split(" ")[1]);

            if (a==0 && b==0) break;

            bw.write(a + b  + "\n");
        }
        bw.flush();
        bw.close();
        br.close();
    }
}
while 1:
    a,b = map(int,input().split())
    if (a==0 and b==0):
        break
    else:
        print(a + b)