| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 5451 | sunyutong | 找找谁的身高超过全班的平均身高 | C++ | Accepted | 100 | 0 MS | 256 KB | 347 | 2020-08-04 16:19:56 |
#include<bits/stdc++.h> using namespace std; int main(){ int h[105]; int n; double ave=0; cin>>n; for (int i=1; i<=n; i++){ cin>>h[i]; ave += h[i]; } ave /= n; printf("%.1f\n",ave); for (int i=1,first=0; i<=n; i++) if (h[i]>ave){ if (++first>1) cout<<" "; cout<<i<<":"<<h[i]; } cout<<endl; return 0; }