A+B - 5 (10952)

유지원·2021년 8월 6일
0

백준OJ

목록 보기
28/32
post-thumbnail

Java 11

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

        while(true) {
            String str = br.readLine();
            int a = str.charAt(0) -48;
            int b = str.charAt(2) -48;
            if (a == 0 && b == 0) break;
            sb.append((a+b)).append('\n');
        }
        System.out.println(sb);
    }
}
profile
👋 https://github.com/ujw0712

0개의 댓글