OJ-Problems-Source/HDOJ/2009_autoAC.cpp
2016-08-19 16:52:35 +08:00

15 lines
255 B
C++

#include <math.h>
#include <stdio.h>
int main(void)
{
int n;
double x, s;
while (scanf("%lf%d", &x, &n) != EOF)
{
for(s = 0.0; n--; x = sqrt(x))
s += x;
printf("%.2lf\n", s);
}
return 0;
}