Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

太水了!!!无语!

Posted by wocha at 2012-04-21 14:10:50 on Problem 2350
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator