提交时间:2021-12-11 14:50:57
运行 ID: 27271
#include<bits/stdc++.h> using namespace std; int n,a[105],ans; double ping; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; ans+=a[i]; } ping=ans/n; printf("%.1lf \n",ping); for(int i=1;i<=n;i++){ if(a[i]>ping){ cout<<i<<":"<<a[i]<<" "; } } return 0; }