백준 java 10952 A+B-5

임명수·2023년 5월 5일
0

백준

목록 보기
10/31

https://www.acmicpc.net/problem/10952


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

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

        StringTokenizer st;
        StringBuilder sb = new StringBuilder();

        while(true){
            st= new StringTokenizer(br.readLine(), " ");
            int A = Integer.parseInt(st.nextToken());
            int B = Integer.parseInt(st.nextToken());

            if(A==0 && B==0){
                break;
            }

            sb.append((A+B)).append("\n");
        }
        System.out.println(sb);

    }
}
profile
푸른영혼의별

0개의 댓글