水
#include<bits/stdc++.h> using namespace std; int main() { int n,t; float m,ans = 0; while(scanf("%f %d",&m,&n)!=EOF){ ans = 0; while(n>0){ ans += m; m = sqrt(m); n--; } printf("%.2f\n",ans); } return 0; }
水
#include<bits/stdc++.h> using namespace std; int main() { int n,t; float m,ans = 0; while(scanf("%f %d",&m,&n)!=EOF){ ans = 0; while(n>0){ ans += m; m = sqrt(m); n--; } printf("%.2f\n",ans); } return 0; }
转载于:https://www.cnblogs.com/zhibin123/p/10490031.html