反弹 输入高度n米 和 m次落地
#include<stdio.h>
int main()
{
int i;
double distance,high,frequency,back;
scanf("%lf%lf",&high,&frequency);
distance=high;
back=high;
for(i=1;i<=frequency-1;i++)
{
back=back/4;
distance=distance+back*2;
}
printf("%.2lf\n%.2lf\n",distance,back/4);
return 0;
}