https://www.acmicpc.net/problem/11022
11022번: A+B - 8
각 테스트 케이스마다 "Case #x: A + B = C" 형식으로 출력한다. x는 테스트 케이스 번호이고 1부터 시작하며, C는 A+B이다.
www.acmicpc.net
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i = 1; i <= t; i++){
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println("Case #" + i + ": " + a + " + " + b + " = " + (a+b));
}
}
}