반응형
11021번: A+B - 7
각 테스트 케이스마다 "Case #x: "를 출력한 다음, A+B를 출력한다. 테스트 케이스 번호는 1부터 시작한다.
www.acmicpc.net
import java.util.*;
public class BOJ11021 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T=sc.nextInt();
for(int i=0;i<T;i++){
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(String.format("Case #%d: ",i+1)+(a+b));
}}
}
반응형
반응형
11021번: A+B - 7
각 테스트 케이스마다 "Case #x: "를 출력한 다음, A+B를 출력한다. 테스트 케이스 번호는 1부터 시작한다.
www.acmicpc.net
import java.util.*;
public class BOJ11021 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T=sc.nextInt();
for(int i=0;i<T;i++){
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(String.format("Case #%d: ",i+1)+(a+b));
}}
}
반응형