| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
不说了,直接贴代码#include<stdio.h>
#include<stdlib.h>
int main()
{
int n,m,data;
int sum,min,max;
while(scanf("%d",&n)!=EOF){
if(n==0)
return 0;
m=n;
sum=0;
min=0x5ffffff;
max=-1;
while(m--){
scanf("%d",&data);
sum+=data;
if(min>data)
min=data;
if(max<data)
max=data;
}
printf("%d\n",(sum-min-max)/(n-2));
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator