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 |
要全搜,再想下In Reply To:WA why? Posted by:mathsoft at 2006-02-25 15:56:47 > #include<stdio.h> > int main() > {int i,n,sum,b=0,Re,a[65]; > scanf("%d",&n); > while(n!=0) > { sum=0; > for(i=0;i<n;i++) > {scanf("%d",&a[i]); > sum+=a[i]; > if(a[i]>b) b=a[i];} > > > for(i=64;i>=1;i--) > if((sum%i==0)&&(sum/i>=b)) > {Re=sum/i;break;} > printf("%d\n",Re); > scanf("%d",&n); > } > //printf("%d",Re); > } > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator