Medium questions, examining thinking, the main mathematical problems, are not difficult, of course, the optimal solution is the best. At present, we should first seek to write correctly, and then pursue optimization in the future.
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
double height=n;
double sum=height;
for(int i=2;i<6;i++)
{
height=height/2;
sum+=2*height;
}
cout<<sum<<endl;
cout<<height/2;
return 0;
}