提交时间:2024-12-29 17:06:13

运行 ID: 3782

#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<<"%"; cout<<setprecision(0)<<fixed<<(youxiurenshu / renshu) * 100<<"%"; }