数值统计
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): 95168 Accepted Submission(s): 463216 0 1 2 3 -1 0 5 1 2 3 4 0.5 0
1 2 3 0 0 5
#include <stdio.h>
int main()
{
int n;
double num;
while (scanf("%d", &n), n != 0)
{
int a = 0, b = 0, c = 0;
while (n--)
{
scanf("%lf", &num);
if (num < 0)
a++;
else if (num > 0)
c++;
else b++;
}
printf("%d %d %d\n", a, b, c);
}
}
2424



被折叠的 条评论
为什么被折叠?



