Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
129633 黄子轩 计算球弹跳高度 C++ 解答错误 0 0 MS 248 KB 294 2024-01-27 09:17:54

Tests(0/2):


#include<iostream> #include<cmath> #include<cstdio> using namespace std; int main() { int h; float a,b,n,g,j; cin>>h; g=h; for(a=1;a<=h;a++){ n+=g*2; g=g/2; if(a==10){ j=g; } } printf("%.3f",n-h); cout<<endl; printf("%.3f",j); }


测评信息: