
앞선 문제랑 거의 다를게 없습니다.
저도 복붙해서 조금만 수정했던걸로 기억하네요.
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));
}
}
}'백준 문제풀이 > 반복문' 카테고리의 다른 글
| 2439. 별 찍기 - 2 (0) | 2022.09.12 |
|---|---|
| 2438. 별 찍기 - 1 (1) | 2022.09.12 |
| 11021. A+B - 7 (0) | 2022.09.12 |
| 15552. 빠른 A+B (1) | 2022.09.12 |
| 25304. 영수증 (0) | 2022.09.11 |