반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import java.io.*;
 
public class Test {
    public static void main(String[] agrs) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        try {
            int n = Integer.parseInt(br.readLine());
            for(int i=0; i<n; i++){
                String[] temp = br.readLine().split(" ");
                bw.write(Integer.parseInt(temp[0])+Integer.parseInt(temp[1])+"\n");
            }
            bw.flush();
        }catch(Exception e) {
            e.printStackTrace();
        }
    }
}
Colored by Color Scripter
반응형

'알고리즘 > 백준' 카테고리의 다른 글

[백준] 2742 기찍 N (Java)  (0) 2019.12.02
[백준] 2741 N찍기 (Java)  (0) 2019.12.02
[백준] 1001 A-B (Java)  (0) 2019.11.26
[백준] 1000 A+B (Java)  (0) 2019.11.26
[백준] 10171 고양이 (Java)  (0) 2019.11.26

+ Recent posts