题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2009
题解:
水题,注意输出格式即可
AC代码:
#include <cstdio>
#include <cmath>
#include <iostream>
using namespace std;
int main(){
int m;
float n = 0;
while (cin >> n >> m) {
float sum = 0;
for(int i = 0; i < m; i++){
sum += n;
n = sqrt(n);
}
printf("%.2f\n", sum);
}
}