http://acm.hdu.edu.cn/showproblem.php?pid=2008
數值統計
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22191 Accepted Submission(s): 11726
- #include<iostream>
- using namespace std;
- int main()
- {
- int n,a,b,c;
- double inn;
- while(cin>>n&&n!=0)
- {
- a=0;b=0;c=0;
- while(n--)
- {
- cin>>inn;
- if(inn<0)
- a++;
- else if(inn==0)
- b++;
- else
- c++;
- }
- cout<<a<<" "<<b<<" "<<c<<endl;
- }
- return 0;
- }