Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
27273 | 邢逸轩 | 找找谁的身高超过全班的平均身高 | C++ | Accepted | 100 | 0 MS | 252 KB | 279 | 2021-12-11 14:51:54 |
#include<bits/stdc++.h> using namespace std; int a[111],n,ans; double p; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; p+=a[i]; } p/=n; printf("%.1lf\n",p); for(int i=1;i<=n;i++){ if(a[i]>p){ printf("%d:%d ",i,a[i]); } } return 0; }