#include<cstdio>
double mul(double x,int y){
double result=1.0;
for(int i=0;i<y;i++){
result*=x;
}
return result;
}
int main(){
int n=0;
double A=0,B=0;
double a[11];
double res_A;
double res_B;
scanf("%d%lf%lf",&n,&A,&B);
for(int i=0;i<n+1;i++){
scanf("%lf",&(a[i]));
double temp=a[i]/(i+1);
res_A+=temp*mul(A,i+1);
res_B+=temp*mul(B,i+1);
}
int result = (int)(res_B-res_A+0.5);
printf("%d\n",result);
return 0;
}
7th_B
最新推荐文章于 2022-08-09 20:40:04 发布