标签:ted cst problem using ble 负数 otto mem 第一个
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 128331 Accepted Submission(s):
61807
1 #include<cstdio> 2 using namespace std; 3 int main() 4 { 5 int n; 6 while(scanf("%d",&n) && n) 7 { 8 double x; 9 int negNum = 0,zeroNum = 0,posNum = 0; 10 while(n--) 11 { 12 scanf("%lf",&x); 13 if(x < 0) 14 { 15 negNum++; 16 } 17 else if(x > 0) 18 { 19 posNum++; 20 } 21 else 22 { 23 zeroNum++; 24 } 25 } 26 printf("%d %d %d\n",negNum,zeroNum,posNum); 27 } 28 return 0; 29 }
标签:ted cst problem using ble 负数 otto mem 第一个
原文地址:https://www.cnblogs.com/knmxx/p/9329258.html