提交时间:2019-11-28 19:40:07

运行 ID: 2502

#include<iostream> using namespace std; int main(){ int n,sum=0,max=0,min=100; int score[20001]={0}; cin>>n; for(int i=1;i<=n;i++){ cin>>score[i]; sum+=score[i]; if(score[i]>max) max=score[i]; if(score[i]>min) min=score[i]; } sum-=max+min; printf("%.1lf",sum*1.0/(n-2)); return 0; }