标签:ott pac printf title int other inpu span 杭电
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 119548 Accepted Submission(s): 58684
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 int n,count; 7 double a,min,max,sum,aver; 8 while(cin>>n&&n) 9 { 10 max=0,min=101,sum=0,count=n; 11 while(n--) 12 { 13 cin>>a; 14 if(a>max)max=a; 15 if(a<min)min=a; 16 sum+=a; 17 } 18 aver=(sum-max-min)/(count-2); 19 printf("%.2lf\n",aver); 20 } 21 return 0; 22 }
标签:ott pac printf title int other inpu span 杭电
原文地址:https://www.cnblogs.com/lightice/p/10261149.html