https://www.acmicpc.net/problem/11021
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
int[] arr = new int[t]; // t๋งํผ ๋ฐฐ์ด์ ํฌ๊ธฐ๋ฅผ ์ง์
int i = 0;
while (i < t) { // t๋งํผ ๋ฐ๋ณต
int a = sc.nextInt();
int b = sc.nextInt(); // a, b๋ฅผ ์
๋ ฅ๋ฐ์์
arr[i] = a + b; // ๋ํ ๊ฒ์ ๋ฐฐ์ด์ ์ฐจ๊ณก์ฐจ๊ณก ์ ์ฅ
i++;
}
sc.close();
int number = 1;
for (int k : arr) { // ๋ฐฐ์ด์ ์์๋ฅผ ํ๋์ฉ ์ถ๋ ฅ
System.out.printf("Case #%d: "+ k + "\n", number);
number++;
}
}
}โ