NO.11022
풀이코드
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));
}
sc.close();
}
}
📌 직전 문제랑 똑같고 출력 형식만 다름! 큰따옴표 많이 들어가서 헷깔리기 쉬움
'JAVA-BAEKJOON > 3단계 반복문' 카테고리의 다른 글
[백준/03-10] 2439 별 찍기 - 2 (2) | 2024.02.28 |
---|---|
[백준/03-09] 2438 별 찍기 - 1 (0) | 2024.02.27 |
[백준/03-07] 11021 A+B - 7 (0) | 2024.02.27 |
[백준/03-06] 15552 빠른 A+B (0) | 2024.02.26 |
[백준/03-05] 25314 코딩은 체육과목 입니다 (0) | 2024.02.26 |