[恢]hdu 2009

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 ;
}



posted @ 2012-01-06 14:20  Seraph2012  阅读(150)  评论(0编辑  收藏  举报