您的位置:首页 > 其它

数值统计 HDU - 2008

2017-04-12 17:26 218 查看
问题类型:一次性AC。

03pie’s solution for [HDU-2008]:

题目链接

#include<iostream>

using namespace std;
const int maxn=100+5;
int main() {
int n;
while(cin>>n&&n){
int a=0,b=0,c=0;
double x;
while(n--){
cin>>x;
if(x<0) a++;
else if(x>0)    c++;
else b++;
}
cout<<a<<" "<<b<<" "<<c<<endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: