A+B - 4 (10951)

유지원·2021년 8월 6일
0

백준OJ

목록 보기
29/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();
        String str;

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

0개의 댓글