您的位置:首页 > 其它

HDU 6066 17多校3 RXD's date(超水题)

2017-08-02 10:02 393 查看
[align=left]Problem Description[/align]
As we all know that RXD is a life winner, therefore he always goes out, dating with his female friends.
Nevertheless, it is a pity that his female friends don't like extremely hot temperature. Due to this fact, they would not come out if it is higher than 35 degrees.
RXD is omni-potent, so he could precisely predict the temperature in the next t days, but he is poor in counting.
He wants to know, how many days are there in the next t days, in which he could go out and date with his female friends.

[align=left]Input[/align]
There is only one test case.

The first line consists of one integer t.

The second line consists of t integers ci which means the temperature in the next t days.

1≤t≤1000

0≤ci≤50

[align=left]Output[/align]
Output an integer which means the answer.

[align=left]Sample Input[/align]

5

33 34 35 36 37

[align=left]Sample Output[/align]

3

题意:要你判断给出的温度有几个在35度及以下

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
#define MAXN 3005

int main()
{
int t,res=0,tmp;
scanf("%d",&t);
while(t--)
{
scanf("%d",&tmp);
if(tmp<=35)
res++;
}
printf("%d\n",res);
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: