• Keep on Truckin'-hdu-1037


    Keep on Truckin'

    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
    Total Submission(s): 6805    Accepted Submission(s): 4694

    Problem Description

    Boudreaux and Thibodeaux are on the road again . . .

    "Boudreaux, we have to get this shipment of mudbugs to Baton Rouge by tonight!"

    "Don't worry, Thibodeaux, I already checked ahead. There are three underpasses and our 18-wheeler will fit through all of them, so just keep that motor running!"

    "We're not going to make it, I say!"

    So, which is it: will there be a very messy accident on Interstate 10, or is Thibodeaux just letting the sound of his own wheels drive him crazy?

     

     

    Input

    Input to this problem will consist of a single data set. The data set will be formatted according to the following description.

    The data set will consist of a single line containing 3 numbers, separated by single spaces. Each number represents the height of a single underpass in inches. Each number will be between 0 and 300 inclusive.

     

     

    Output

    There will be exactly one line of output. This line will be:

       NO CRASH

    if the height of the 18-wheeler is less than the height of each of the underpasses, or:

       CRASH X

    otherwise, where X is the height of the first underpass in the data set that the 18-wheeler is unable to go under (which means its height is less than or equal to the height of the 18-wheeler).
    The height of the 18-wheeler is 168 inches.

     

     

    Sample Input

    180 160 170

     

     

    Sample Output

    CRASH 160

    中文翻译: 

    问题说明
    德留克斯和THIBODEAUX的的道路上再次。 。 。

    “包德留克斯,我们必须得到这个mudbugs装运,巴吞鲁日,在今晚!”

    “不要担心,THIBODEAUX,我已经提前检查​​有三个地下通道,我们18轮将通过所有这些,所以只是保持,电机运行!”

    “我们不会做它,我说!”

    所以,这是它会有一个非常混乱的10号州际公路上的事故,或者是THIBODEAUX只是让自己的车轮声开车送他疯了吗?

     

    输入
    输入到这个问题,将包括一个单一的数据集。根据下面的描述中,该数据集将被格式化。

    该数据集将包括一行含有3个号码,用一个空格隔开。每个数字代表一个单一的地下道英寸的高度。每个号码可获介于0和300(含)。

     

    产量
    将是完全有一行输出。这条线将是:

       没有崩溃

    如果在18轮的高度小于在地下通道中的每一个的高度,或

       CRASH X

    否则,其中X是第一个地下通道中的数据集,18轮无法去下(这意味着它的高度是小于或等于18轮的高度)的高度。
    18轮的高度为168英寸。
    #include<stdio.h>

    int main()

    {

        int n,i,a[3];

        while(scanf("%d%d%d",&a[0],&a[1],&a[2])!=EOF)

        {

          for(i=0;i<3;i++)

          {

           if(a[i]<=168)

           {printf("CRASH %d ",a[i]);break;}

          }

          if(i==3)

          printf("NO CRASH ");

        }

        return 0;

    }//不要想的太难,其实就是找小于等于168的数,找到一个即可。。如果都大于168 则不崩溃。

  • 相关阅读:
    实际项目管理-1
    arcengine 错误
    一些视频技术类网站
    winform 组件之dotnetbar10.5.3
    winform 弹框的组件
    一个好的开源网站
    写webservice 注意点
    ww
    js
    瀑布流
  • 原文地址:https://www.cnblogs.com/zhouhongweihpu/p/3217887.html
Copyright © 2020-2023  润新知