Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
3780 | D班-汤依宁 | 成绩统计 | C++ | 解答错误 | 0 | 1 MS | 260 KB | 404 | 2024-12-29 17:04:02 |
#include <bits/stdc++.h> using namespace std; int main() { int renshu,cishu,c,jigerenshu=0,youxiurenshu=0; cin>>renshu; for(cishu=0;cishu<renshu;cishu++) { cin>>c; if(c>=60) { jigerenshu++; } if(c>=85) { youxiurenshu++; } } cout<<setprecision(0)<<fixed<< (jigerenshu / renshu) * 100<<"%"; cout<<setprecision(0)<<fixed<<(youxiurenshu / renshu) * 100<<"%"; }