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 |
贴了In Reply To:不说了,直接贴代码 Posted by:bjtu1 at 2009-03-24 23:48:28 > #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