提交时间:2024-01-27 11:58:36

运行 ID: 129863

#include<bits/stdc++.h> using namespace std; int main(){ double h,d; cin>>h; double r=h; for(int i=1;i<=10;i++){ d+=h*2; h/=2; } cout<<fixed<<setprecision(3)<<d-r<<endl; cout<<fixed<<setprecision(3)<<h; return 0; }