提交时间:2021-12-18 13:48:07

运行 ID: 27657

#include<bits/stdc++.h> using namespace std; int n; double h[110],avg; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>h[i]; avg+=h[i]; } avg/=n; // avg=avg/n; printf("%.1lf\n",avg); for(int i=1;i<=n;i++){ if(h[i]>avg){ printf("%d:%.0lf ",i,h[i]); } } return 0; }