提交时间:2020-08-01 21:32:38

运行 ID: 5391

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