Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
太水了!!!无语!#include<stdio.h> int d[1043]; int main() { int N; scanf("%d",&N); while(N--) { int n,i,m,s,q,j; scanf("%d",&n); s=0; for(i=1;i<=n;i++) { scanf("%d",&d[i]); s+=d[i]; } double Av; Av=s*1.00/n; int cut=0; for(i=1;i<=n;i++) { if(d[i]*1.00>Av) cut++; } printf("%.3f",cut*100.00/n*1.00); char a='%'; printf("%c\n",a); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator