hdu 2014
水题
AC代码:
#include <stdio.h> int main() { int i,n,a[100]; while(scanf("%d",&n)!=EOF) { int max=0,min=99999999,sum=0; for(i=1;i<=n;i++) { scanf("%d",&a[i]); sum+=a[i]; if(a[i]>max) max=a[i]; if(a[i]<min) min=a[i]; } printf("%.2lf\n",(sum-max-min)*1.0/(n-2)); } return 0; }