문제링크
https://www.acmicpc.net/problem/15552
나의코드
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
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 num =Integer.parseInt(br.readLine());
StringTokenizer st;
for(int i = 0; i < num; i++){
st = new StringTokenizer(br.readLine()," ");
bw.write((Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken())) + "\n");
}
br.close();
bw.flush();
bw.close();
}
}
'Baekjoon Online Judge' 카테고리의 다른 글
[BOJ] 백준 11022번 A+B - 8 (Java) (0) | 2023.01.09 |
---|---|
[BOJ] 백준 11021번 A+B - 7 (Java) (0) | 2023.01.08 |
[BOJ] 백준 25304번 영수증 (Java) (0) | 2023.01.06 |
[BOJ] 백준 8393번 합 (Java) (0) | 2023.01.05 |
[BOJ] 백준 10950번 A+B - 3 (Java) (0) | 2023.01.04 |
댓글