提交时间:2019-11-24 11:00:15
运行 ID: 2380
#include<iostream> int main(){ int n; scanf("%d",&n); int a[101]={0}; int d=0,x=101; double z=0; for(int i=1;i<=n;i++){ scanf("%d",&a[i]); if(a[i]>d) d=a[i]; if(a[i]<x) x=a[i]; z+=a[i]; } z=z-d-x; printf("%.1lf",z/n); return 0; }