A+B - 4 (10951)

691 단어 백준OJ백준OJ

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);
    }
}

좋은 웹페이지 즐겨찾기