信息学奥赛 一本通1085 球弹跳高度的计算
#include<bits/stdc++.h>
using namespace std;
int main() {
/*
h 20 sum = 20
1. 10 -> sum = 20+10*2 , h = h/2
微信 14808098
*/
double h;
cin>>h;
double sum=h;
for(int i=2;i<=10;i++){
sum = sum + h;
h = 1.0*h/2;
}
h=h/2;
cout<<sum<<endl;
cout<<h<<endl;
return 0;
}