xu_Mark_shen @ 2022-07-22 18:28:04
#include<cstdio>
#include<algorithm>
using namespace std;
int n,a[10005];
float ans;
int main()
{
scanf("%d",&n);
for(int i = 1;i <= n;i++) scanf("%d",a[i]);
sort(a + 1,a + n + 1);
for(int i = 2;i <= n - 1;i++) ans += a[i];
printf("%.2f",ans / (n - 2));
return 0;
}
by char_cha_ch @ 2022-07-22 18:30:13
@xu_Mark_shen 输入的&号忘打了
by xu_Mark_shen @ 2022-07-22 18:36:45
@kirihara233 谢谢大佬