提交时间:2019-11-30 12:10:25
运行 ID: 2570
#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\n",avg); for(int i=1;i<=n;i++){ if(c[i]>avg) cout<<i<<":"<<c[i]<<" "; } return 0; }