Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128813 刘语晗 求最大公约数和最小公倍数 C++ 解答错误 0 0 MS 252 KB 347 2024-01-26 10:24:51

Tests(0/3):


#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); }


测评信息: