提交时间:2024-01-26 11:40:09

运行 ID: 128927

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