728x90
반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuffer sb = new StringBuffer();
StringTokenizer st;
int sum=0;
int T = Integer.parseInt(br.readLine());
for(int tc=1;tc<=T;tc++) {
sb.append("Case").append(" ").append("#").append(tc).append(":").append(" ");
st = new StringTokenizer(br.readLine());
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
sum = A+B;
sb.append(sum).append("\n");
}
System.out.println(sb);
}
}
|
cs |
728x90
반응형
'알고리즘 > 알고리즘 기초문제(백준-입출력)' 카테고리의 다른 글
[백준]11718_그대로 출력하기 (0) | 2022.02.15 |
---|---|
[백준]11022_A+B - 8 (0) | 2022.02.15 |
[백준]10952_A+B - 5 (0) | 2022.02.14 |
[백준]2557_A+B - 3 (0) | 2022.02.14 |
[백준]2558_A+B - 2 (0) | 2022.02.14 |