提交时间:2019-11-29 21:01:50

运行 ID: 2541

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