Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
129728 | 林麒瑞 | 计算球弹跳高度 | C++ | 解答错误 | 0 | 0 MS | 248 KB | 244 | 2024-01-27 10:09:51 |
#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+2; h/=2; r=h; } cout<<fixed<<setprecision(3)<<d<<endl; cout<<fixed<<setprecision(3)<<r; return 0; }