A+B - 7 (11021)

837 단어 백준OJ백준OJ

Java 11

import java.io.*;
import java.util.StringTokenizer;

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

        int a = Integer.parseInt(br.readLine());

        StringTokenizer st;
        for (int i=1; i<=a; i++) {
            st = new StringTokenizer(br.readLine(), " ");
            bw.write("Case #"+i+": ");
            bw.write(Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken()) + "\n");
        }
        br.close();
        bw.flush();
        bw.close();
    }
}

좋은 웹페이지 즐겨찾기