d511: 小明的作業
題目:http://zerojudge.tw/ShowProblem?problemid=d511
程式碼:
程式碼:
import java.util.Scanner;
public class d511 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int count = 0;
for(int i=1;i<=5;i++){
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a+b>c && b+c>a && a+c>b){
count++;
}
}
System.out.println(count);
}
}
}

留言
張貼留言