您的位置:首页 > 其它

HDU 6066 RXD's date(水~)

2017-08-07 09:44 369 查看
Description

给出n个数,问不大于35的数有多少个

Input

第一行一整数n,之后n个整数a[i] (1<=t<=1000,0<=a[i]<=50)

Output

输出n个整数中不大于35的数的个数

Sample Input

5

33 34 35 36 37

Sample Output

3

Solution

水题

Code

#include<cstdio>
using namespace std;
const int maxn=1001;
int main()
{
int n,a,ans=0;
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
scanf("%d",&a);
if(a<=35)ans++;
}
printf("%d\n",ans);
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: