#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:众数
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.