#include<stdio.h> int main() { int n,num,max; while(scanf("%d",&n)!=EOF) { int times[32768]={0};//由于题目没有给数据范围,碰巧这样也能过 for(int i=1;i<=n;i++) { scanf("%d",&num); times[num]++; if(times[num]>=(n+1)/2) max=num; } printf("%d\n",max); } return 0; }