소스
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
public class Main{
public static void main(String[]args){
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
for(int i=1; i<=num; i++){
int a = scan.nextInt();
int b = scan.nextInt();
if(a >0 && b < 10) {
System.out.println("Case #"+ i +": "+ a +" + "+ b +" = "+ (a+b));
}
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
cs |
실수한 점 : 생각없이 &&를 || 로 썼다.
'알고리즘 > Java' 카테고리의 다른 글
(JAVA) 백준 알고리즘 3단계 2439번 : 별찍기 - 2 (0) | 2020.04.14 |
---|---|
(JAVA) 백준 알고리즘 3단계 2438번 : 별 찍기 - 1 (0) | 2020.04.09 |
(JAVA) 백준 알고리즘 3단계 11021번 : A + B - 7 (0) | 2020.04.09 |
(JAVA) 백준 알고리즘 3단계 2742번 : 기찍N (0) | 2020.04.09 |
(JAVA) 백준 알고리즘 3단계 2741번 : N 찍기 (0) | 2020.04.09 |