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 |
unkonwn!help不知错在哪? #include<stdio.h> #include <math.h> #define Max 11000 int main() { int i,j,n,m,a[Max]={0},mark; double min; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&m); a[i]=m; } for(i=0;i<n;i++) for(j=i+1;j<n;j++) if(a[i]<a[j]) {mark=a[i];a[i]=a[j];a[j]=mark;} min=2*sqrt((double)a[0]*(double)a[1]); for(i=2;i<n;i++) min=2*sqrt(min*(double)a[i]); printf("%.3lf\n",min); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator