Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
3783 | D班-汤依宁 | 成绩统计 | C++ | 通过 | 100 | 1 MS | 268 KB | 413 | 2024-12-29 17:07:30 |
#include <bits/stdc++.h> using namespace std; int main() { double 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<<"%"<<endl; cout<<setprecision(0)<<fixed<<(youxiurenshu / renshu) * 100<<"%"; }