当前位置: 代码迷 >> 综合 >> HDOJ 1037 Keep on Truckin'
  详细解决方案

HDOJ 1037 Keep on Truckin'

热度:77   发布时间:2023-10-21 18:20:38.0

HDACM 1037


英语很重要!!!

大意是:输入3个数,与168相比较,有一个比168小就说明过不去(CRASH)。


import java.util.Scanner;public class Main{public static void main(String[] args) {Scanner sc = new Scanner(System.in);while(sc.hasNext()){int a = sc.nextInt();int b = sc.nextInt();int c = sc.nextInt();if (a<168) {System.out.println("CRASH "+a);continue;}if(b<168){System.out.println("CRASH "+b);continue;}if (c<168) {System.out.println("CRASH "+c);continue;}System.out.println("NO CRASH");}sc.close();}
}