题目1057:众数
#include <stdio.h>
void main(){
int a=0;
while (~scanf("%d",&a)){
int temp=0,hash[11]={0},k=-1;
hash[a]++;
for(int i=1;i<20;i++){scanf("%d",&a);hash[a]++;}
for(int i=1;i<11;i++)
if(hash[i]>k){k=hash[i];temp=i;}
printf("%d\n",temp);
}
}
/**************************************************************
Problem: 1057
User: 爱理momoko
Language: C
Result: Accepted
Time:0 ms
Memory:912 kb
****************************************************************/