提交时间:2021-12-11 14:39:38

运行 ID: 27243

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