标签:des style blog color io java strong for 数据
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 46823 Accepted Submission(s):
23468
1 #include<cstdio> 2 int main() 3 { 4 int n; 5 while(scanf("%d",&n)==1) 6 { 7 if(n<=2||n>100)return 0; 8 int maxs=0,mins=10000; 9 float sum=0; 10 for(int i=0;i<n;i++) 11 { 12 int mm; 13 scanf("%d",&mm); 14 if(mins>mm)mins=mm; 15 if(maxs<mm)maxs=mm; 16 sum=sum+mm; 17 } 18 sum=(sum-maxs-mins)/(n-2); 19 printf("%.2f\n",sum); 20 } 21 return 0; 22 }
标签:des style blog color io java strong for 数据
原文地址:http://www.cnblogs.com/The-courage-that-year/p/3993485.html