#include <iostream> #include <iomanip> using namespace std; int main() { // 下落的高度和落地的次数 double h; int n; cin >> h; cin >> n; // write your code here...... double sum = 0; for (int i = 1; i <= n; i++) { sum += h; h /= 2; sum += h; } // printf("%0.1f %0.1f\n", sum - h, h); cout << fixed << setprecision(1) << sum - h << " " << setprecision( 1) << h << endl; return 0; }