Problem : 2014 ( 青年歌手大奖赛_评委会打分 ) Judge Status : Accepted
RunId : 6000194 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta
RunId : 6000194 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta
1 #include <stdio.h> 2 int main() 3 { 4 int max,min,sum,n,s,t; 5 while (scanf("%d",&n)!=EOF) 6 { 7 sum=0; 8 min=100; 9 max=2; 10 t=n; 11 while (t--) 12 { 13 scanf("%d",&s); 14 min=min>s?s:min; 15 max=max>s?max:s; 16 sum+=s; 17 } 18 printf("%.2lf\n",(sum-min-max)*1.0/(n-2)); 19 } 20 return 0; 21 }