| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 128815 | 刘一诺 | 计算球弹跳高度 | C++ | Accepted | 100 | 0 MS | 248 KB | 342 | 2024-01-26 10:25:01 |
#include<bits/stdc++.h> using namespace std; float passed,height,turn; int ball(float height,float turn) { if(turn==10) { cout<<fixed<<setprecision(3)<<passed<<endl<<height/2; return 0; } if(turn==9) { passed+=height+height; } else { passed+=height+height/2; } ball(height/2,turn+1); } int main() { cin>>height; ball(height,1); }