Author : Jisan
Programming language : Java
Difficulty : Easy
Status : Accepted
Problem number : UVA-12372
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3794
Code:
import java.util.*;
public class Uva_12372 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
while(in.hasNext()){
int a=in.nextInt();
int Case=0;
for(int i=1;i<=a;i++){
int L=in.nextInt();
int W=in.nextInt();
int H=in.nextInt();
Case++;
if(L<=20 && W <=20 && H<=20){
System.out.println("Case "+ (Case)+":"+" good");
}else{
System.out.println("Case "+ (Case)+":"+" bad");
}
}
}
}
}
Programming language : Java
Difficulty : Easy
Status : Accepted
Problem number : UVA-12372
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3794
Code:
import java.util.*;
public class Uva_12372 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
while(in.hasNext()){
int a=in.nextInt();
int Case=0;
for(int i=1;i<=a;i++){
int L=in.nextInt();
int W=in.nextInt();
int H=in.nextInt();
Case++;
if(L<=20 && W <=20 && H<=20){
System.out.println("Case "+ (Case)+":"+" good");
}else{
System.out.println("Case "+ (Case)+":"+" bad");
}
}
}
}
}
No comments:
Post a Comment