| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 77296 | sh25_shenpy | 年龄与疾病 | C++ | 解答错误 | 1 MS | 248 KB | 540 | 2025-12-21 21:46:39 |
#include <bits/stdc++.h> using namespace std; int s[1010]; int main( ) { int n,q,w,e,r,nn; cin>>n; for(int i=0;i<n;++i){ cin>>s[i]; nn=s[i]; if(nn<=18) q++; else if(nn<=35) w++; else if(nn<=60) e++; else r++; } cout<<fixed<<setprecision(2)<<1.0*q/n*100<<"%"<<endl; cout<<fixed<<setprecision(2)<<1.0*w/n*100<<"%"<<endl; cout<<fixed<<setprecision(2)<<1.0*e/n*100<<"%"<<endl; cout<<fixed<<setprecision(2)<<1.0*r/n*100<<"%"<<endl; return 0;}