http://acm.hdu.edu.cn/showproblem.php?pid=2008
#pragma warning(disable:4996) #include<stdio.h> int main() { int n; double num; int a, b, c; while (scanf("%d ", &n),n ) { a = b = c = 0; for (int i = 0; i < n; i++) { scanf("%lf", &num); if (num < 0) a++; else if (num > 0) c++; else b++; } printf("%d %d %d ", a ,b,c); } return 0; }