#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int i,j,k,a[233],sum;
while(cin>>i,i){
sum=0;
for(j=0;j<i;j++) cin>>a[j];
sort(a,a+i);
for(j=1;j<i-1;j++) sum+=a[j];
cout<<sum/(i-2)<<endl;
}
return 0;
}
HDU 2309 ICPC Score Totalizer Software
最新推荐文章于 2018-06-11 17:09:01 发布