HDU/2009/main.c

17 lines
272 B
C
Raw Permalink Normal View History

2020-08-31 16:48:58 +00:00
#include <stdio.h>
#include <math.h>
int main(void){
int n = 0, m = 0;
while(scanf("%d %d",&n,&m) == 2){
int i = 0;
double all = 0.0, temp = n;
for(i = 0; i < m; i++){
all += temp;
temp = sqrt(temp);
}
printf("%.2lf\n",all);
getchar();
}
return 0;
}