这几天被机器学习的复习折腾的死去活来,今儿是在坚持不下去了,回来写写代码,发现竟然完全没有思路了,哼,这才几天没写啊~写了个短的~
/*3-1 int*/
#include<stdio.h>
#include<string.h>
#define MAX 101+10
int score[MAX];
int main()
{
freopen("data.in","r",stdin);
freopen("data.out","w",stdout);
int n,max=0,i;
memset(score,0,sizeof(score));
while(scanf("%d",&n)==1)
{
score[n]++;
if(score[n]>max)
max = score[n];
}
for(i=0;i<=100;i++)
{
if(score[i]==max)
{
printf("%d\n",i);
}
}
return 0;
}
刚开始没读懂题,哎,果然复习影响智商