#include <iostream>
#include <math.h>
using namespace std;
int main(){
int n;
double k;
cin>>n>>k;
double sum;
double temp;
cin>>sum;
for(int i=1;i<=n;i++){
cin>>temp;
temp=temp*pow(1+k,-i);
sum+=temp;
}
cout<<sum;
return 0;
}
ccfcsp202212-1现值计算
最新推荐文章于 2024-07-25 19:36:06 发布