提交时间:2024-01-27 09:30:45

运行 ID: 129656

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