Algorithm/Java
[백준/자바] 11021번 - Java
isshosng
2022. 1. 24. 20:24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// 각 테스트 케이스마다 "Case #x: "를 출력한 다음, A+B를 출력한다. 테스트 케이스 번호는 1부터 시작한다.
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
for (int i = 1; i <= a; i++) {
int c = in.nextInt();
int d = in.nextInt();
System.out.println("Case #" + i + ": " + (c + d));
}
in.close();
}
}
|
cs |
반응형