@ -0,0 +1,22 @@
int main()
{
double x,k=1,f=1,e,n;
double a=0;
scanf("%lf %lf",&x,&n);
if(n < 0)
printf("error");
else
for(int i = 1;i <= n;i++)
a =pow((double)x,(double)i);
k = k*i;
e = a/k;
f += e;
}
printf("%.6lf",f);
return 0;