Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
56135 | 许兴平 | 球弹跳高度的计算 | C++ | Accepted | 1 MS | 240 KB | 287 | 2024-11-09 14:30:11 |
#include<bits/stdc++.h> using namespace std; int main(){ int m; cin>>m; double result1=m*1.0,result2=m*1.0; for(int i=1;i<10;i++){ result2/=2; int a=1; for(int k=1;k<i;k++){ a*=2; } result1+=1.0*m/a; } cout<<result1<<endl<<result2/2<<endl; return 0; }