提交时间:2021-12-11 15:05:49

运行 ID: 27287

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