#include <stdio.h> int cmp(const void*a,const void *b) //从小到大排序 { return *(int *)a-*(int *)b; } int main(){ int n,i; while(scanf("%d",&n)!=EOF){ if(n==0) break; int a[n]; for(i=0;i<n;i++) scanf("%d",&a[i]); qsort(a,n,sizeof(a[0]),cmp); //快速排序 if (n%2==0) printf("%d\n",(a[n/2]+a[n/2-1])/2); else printf("%d\n",a[n/2]); } }(•̀ᴗ•́)و