idea
权重记得也是浮点数,否则2,5测试点不过
solution
#include <stdio.h>
int main(){
int n ;
double x0, ans = 0, power = 1;
scanf("%d%lf", &n, &x0);
double a[n+1];
for(int i = 0; i <= n; i++)
scanf("%lf", a + i);
for(int i = n-1; i >= 0; i--){
power *= x0;
ans += a[i] * power;
}
printf("%.3f", ans + a[n]);
return 0;
}