不解释。
#include <stdio.h>
#include <math.h>
int main()
{
double n,m;
while(scanf("%lf%lf",&n,&m)!=EOF)
{
double x=0,y=n;
for(int a=1;a<m;a++)
{
x=sqrt(n);
y+=x;
n=x;
}
printf("%.2f\n",y);
}
return 0;
}