| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 27284 | 董承诺 | 找找谁的身高超过全班的平均身高 | C++ | Accepted | 100 | 0 MS | 252 KB | 321 | 2021-12-11 15:01:41 |
#include<bits/stdc++.h> using namespace std; int n,a[101]; double b; int main(){ cin>>n; for(int i=1;i<=n;i++) cin>>a[i]; for(int i=1;i<=n;i++){ b+=a[i]; } b/=n; printf("%.1lf",b); cout<<endl; for(int i=1;i<=n;i++){ if(a[i]>b){ printf("%d:%d ",i,a[i]); } } return 0; }