#include <stdio.h>
int
main(int argc, char **argv) {
int n;
int positive_count;
int negative_count;
int zero_count;
double temp;
while (scanf("%d", &n) == 1 && n != 0) {
positive_count = negative_count = zero_count = 0;
while (n--) {
scanf("%lf", &temp);
if (temp < 0) negative_count++;
else if (temp == 0) zero_count++;
else positive_count++;
}
printf("%d %d %d\n", negative_count, zero_count, positive_count);
}
return 0;
}
ACM简单题——HDU2008 数值统计
最新推荐文章于 2019-10-13 16:06:00 发布