Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
48149 | yuhaoyu | 【例39.2】 球弹跳高度的计算 | C++ | No Test Data | 0 MS | 0 KB | 242 | 2024-05-27 20:55:34 |
#include <iostream> using namespace std; int main(){ double h,total=0.0; cin>>h; total=total+h; h=h/2; for(int i=2;i<=10;i++) { total=total+2*h; h=h/2; } cout<<total<<endl; cout<<h<<endl; return 0; }