提交时间:2024-05-12 14:25:48
运行 ID: 47095
#include<iostream> using namespace std; int main() { double h; cin>>h; double sum; int n=1; while(n<=10){ n++; sum+=h+h/2; h/=2; } sum-=h; cout<<sum<<endl<<h; return 0; }