提交时间:2019-11-23 15:12:45

运行 ID: 2356

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