728x90
출처-https://www.acmicpc.net/problem/15552
728x90
import java.io.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
int t=Integer.parseInt(bf.readLine());
for (int i=0;i<t;i++) {
String s=bf.readLine();
String arr[]=s.split(" ");
int add=Integer.parseInt(arr[0])+Integer.parseInt(arr[1]);
bw.write(add+"\n");
}
bw.flush();
}
catch (IOException e) {
e.printStackTrace();
System.out.println(e.getMessage());
}
}
}
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 1110] 더하기 사이클 (java) (0) | 2020.08.21 |
---|---|
[백준, BOJ 10871] X보다 작은 수 (java) (0) | 2020.08.21 |
[백준, BOJ 2884] 알람 시계 (java) (0) | 2020.08.20 |
[백준, BOJ 14681] 사분면 고르기 (java) (0) | 2020.08.20 |
[백준, BOJ 2753] 윤년 (java) (0) | 2020.08.20 |