| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 6236 | 陶俊宸 | 年龄与疾病 | C++ | Accepted | 100 | 0 MS | 260 KB | 318 | 2020-09-19 21:40:08 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,o; double a=0,b=0,c=0,d=0; cin>>n; for(int i=0;i<n;i++){ cin>>o; if(o<=18) a++; else if(o<=35) b++; else if(o<=60) c++; else d++; } printf("%.2lf%%\n%.2lf%%\n%.2lf%%\n%.2lf%%",a/n*100,b/n*100,c/n*100,d/n*100); return 0; }