mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
15 lines
255 B
C++
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;
|
||
|
}
|