解题思路:
注意事项:
参考代码:
#include <iostream> #include <iomanip> using namespace std; int main() { int m = 0, n = 0; double c = 0, d = 0; cin >> m >> n; c = m, d = m; for (int i = 0; i < n; i++) { d += c; c /= 2; } d -= 2 * c; cout << fixed << setprecision(2) << c << ' ' << d; return 0; }
0.0分
0 人评分