PersonalCorpus 版 (精华区)

1139705  Big Guava ... 10370 Accepted
0:00.010 64 2002/10/03 04:07:56.970

#include "myfunc.cpp"


void main()
{
#ifndef ONLINE_JUDGE
    freopen("c:\\0acm\\uva\\contest9-29\\iD","r",stdin);
    freopen("c:\\0acm\\uva\\contest9-29\\oD","w",stdout);
#endif

    int i,j,k,n,c;
    int a[1001];
    double aver;

    readnum(c);
    while (c--) {
        readnum(n);
        aver=0;
        for (i=0;i<n;i++) {
            readnum(a[i]);
            aver+=a[i];
        }
        aver/=n;
        k=0;
        for (i=0;i<n;i++) if (a[i]>aver) k++;
        aver=k;
        aver/=n;
        printf("%.3lf%\n",aver*100);
    }
}
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.344毫秒