#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
****************************************************************/
九度 題目1057:衆數 2011年 哈爾濱工業大學 計算機 研究生 機試真題
題目1057:衆數
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.