| ||||||||||
| 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 | |||||||||
第30题留个记号#include<stdio.h>
int main()
{ double x,y,sum=0,c;
int n,i;
scanf("%d",&n);
scanf("%lf%lf",&x,&y);
i=n;
while(i)
{
scanf("%lf",&c);
sum+=c*i--;
}
printf("%.2f\n",(y+x*n-2*sum)/(n+1));
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator