提交时间:2024-05-12 14:28:55
运行 ID: 47098
#include <iostream> using namespace std; int main() {double h0,i,s,h; cin>>h0; s=0; h=0; for(i=1;i<=10;i++) {s+=h0+h; h=h0*0.5; h0=h;} cout<<s<<' '<<h; return 0; }