提交时间:2019-11-25 21:29:02

运行 ID: 2458

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