Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
333240 | 李俞家骅 | 【C1-9】计算比值 | C++ | 通过 | 100 | 1 MS | 248 KB | 223 | 2025-07-16 10:38:51 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if(a<b) cout<<fixed<<setprecision(2)<<100.0*a/b<<"%"; else cout<<fixed<<setprecision(2)<<100.0*b/a<<"%"; return 0; }