2011-12-12 05:04:42
地址:http://acm.hdu.edu.cn/showproblem.php?pid=2009
题意:中文题。
代码:
# include <stdio.h>
# include <math.h>
int main ()
{
int m ;
double n, sum ;
while (~scanf ("%lf%d", &n, &m))
{
sum = 0 ;
while (m--)
{
sum += n ;
n = sqrt(n) ;
}
printf ("%.2lf\n", sum) ;
}
return 0 ;
}