Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122253 王子涵 18患病人数占总患病人数的比例 C++ Wrong Answer 1 MS 272 KB 428 2025-06-15 09:22:14

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[101],n,sum=0,b,c,d,e; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; if(a[i]<=18) e++; if(19<=a[i] && a[i]<=35) b++; if(36<=a[i] && a[i]<=60) c++; if(a[i]>=61 ) d++; } printf("%.2f%%\n",e*1.0/10*100); printf("%.2f%%\n",b*1.0/10*100); printf("%.2f%%\n",c*1.0/10*100); printf("%.2f%%\n",d*1.0/10*100); return 0; }


Run Info:

------Input------
14 49 93 26 7 7 90 95 66 43 17 89 75 35 86
------Answer-----
21.43% 14.29% 14.29% 50.00%
------Your output-----
48270270.00% 80322820.00% 48271700.00% 70.00%