#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
int h,times;
cin >> h >> times;
double distance;
distance = 3*h-2*h*pow(0.5,times-1);
double h2=h/(2*pow(2,times-1));
cout << fixed << setprecision(1) << distance << ' ' << h2 << endl;
return 0;
}
用等比数列以及等比数列求和

京公网安备 11010502036488号