LiXinLong_LXL @ 2024-04-30 19:14:17
#include<bits/stdc++.h>
using namespace std;
int n,a[1000],maxx,minn=10;
double sum=0;
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
scanf("%d",&a[i]);
sum+=a[i];
maxx=max(maxx,a[i]);
minn=min(minn,a[i]);
}
printf("%.2f",(sum-maxx-minn)/(n-2)*1.00);
return 0;
}
by lcfollower @ 2024-04-30 19:21:02
@LiXinLong_LXL 你不感觉如果
by LiXinLong_LXL @ 2024-04-30 19:24:08
@zjhs005 通过了,感谢大佬指导!!!