提交时间:2019-11-30 10:39:44
运行 ID: 2567
#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; }