#include<stdio.h>
#include<math.h>
int main()
{
double n,sum,l;
//float用 %f,double用 %lf
int i,m;
while(scanf("%lf%d",&n,&m)!=EOF)
{
sum=n;
i=m-1;
while(i--)
{
l=sqrt(n);
sum+=l;
n=l;//赋值的时候需要两个数据为同一类型
}
printf("%.2lf\n",sum);
}
return 0;
}
#include<math.h>
int main()
{
double n,sum,l;
//float用 %f,double用 %lf
int i,m;
while(scanf("%lf%d",&n,&m)!=EOF)
{
sum=n;
i=m-1;
while(i--)
{
l=sqrt(n);
sum+=l;
n=l;//赋值的时候需要两个数据为同一类型
}
printf("%.2lf\n",sum);
}
return 0;
}