提交时间:2024-05-12 18:28:17
运行 ID: 47203
#include<iostream> using namespace std; int main(){ double h,s=0,b; cin>>h; for(int i=1;i<=10;i++){ s=s+h+b; h=h/2; b=h; } cout<<s<<endl<<h; return 0; }