提交时间:2019-11-28 21:53:18

运行 ID: 2521

#include<iostream> using namespace std; int main(){ int num; double sum=0,a[101]={0},sg; cin>>num; for(int i=1;i<=num;i++){ cin>>a[i]; sum+=a[i]; } sg=sum/num; printf("%.1lf\n",sg); for(int i=1;i<=num;i++){ if(a[i]>sg){ cout<<i<<":"<<a[i]<<" "; } } return 0; }