Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	table := make([]int, 100)
	now := 0
	max := 0
	for i := range table {
		table[i] = 0
	}
	for scanner.Scan() {
		now, _ =strconv.Atoi(scanner.Text())
		table[now-1]++
		if table[now-1] > max {
			max = table[now-1]
		}
	}
	for i := 0; i < 100; i++ {
		if table[i] == max {
			fmt.Println(i+1)
		}
	}
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
#include<map>
using namespace std;

int main(){
    int mod=1000000007;
    int n,tmp=0;
    int a[101]={0};
    while (scanf("%d",&n)!=EOF) {
        a[n]+=1;
        tmp=max(tmp,a[n]);
    }
    for (int i=1;i<101;i++) {
        if (a[i]==tmp) {
            printf("%d\n",i);
        }
    }
    return 0;
}

C++: #include<iostream>
#include<vector>

using namespace std;

int main(){
    vector<int>Times(101,0);
    int x;
    while(cin >> x){
      Times[x]+=1;
    }
    
    int ma =-1;
    for(int x=1; x<=100; x++){
        if(ma<Times[x]) ma=Times[x];
    }
     
    for(int x=1; x<=100; x++){
        if(Times[x] == ma) cout << x << endl;
    } 
    return 0;
}

C++: #include <stdio.h>

int main(void) {
  int i, j, k, n, ans[101], max = 0;
  for(i = 0; i < 101; ++i) ans[i] = 0;
  while(scanf("%d", &n) != EOF) {
    ++ans[n];
  }
  for(i = 1; i < 101; ++i) if(max < ans[i]) max = ans[i];
  for(i = 1; i < 101; ++i) if(ans[i] == max) printf("%d\n", i);
  return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
	int nums[100]={0};
	int max=0;
	for (int n; cin >> n;) {
		nums[n-1]++;
		if (nums[n-1]>max) {
			max=nums[n-1];
		}
	}
	for (int i=0; i<100; i++) {
		if (max==nums[i]) {
			cout << i+1 << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<vector>

using namespace std;

int main()
{
	int i,j;
	int num[100]={0};
	int a;
	int max=0;
	vector<int> ans;
	
	for(i=0;cin >> a;i++)
	{
		num[a]++;
		
		for(j=0;j<i;j++)
		{
			if(num[j]>max)
			{
				max=num[j];
			}
		}
	}
	
	for(j=0;j<i;j++)
		if(num[j]==max)
			ans.push_back(j);
		vector<int>::iterator it = ans.begin();
	for(;it!=ans.end();++it)
		cout << *it << endl;
}

C++: #include<iostream>
int main(){
  int l[9999],i,f;
  for(i=0;i<999;i++) l[i]=0;
  while(std::cin>>i)l[i-1]++;
  for(i=0,f=0;i<9999;i++)
    if(f<l[i])f=l[i];
  for(i=0;i<9999;i++)
    if(l[i]==f)std::cout<<i+1<<"\n";
}

C++: #include <iostream>
#include <map>

using namespace std;

int main()
{
#if 1
	int a[101] = {0};
	int v;

	// 数え上げ
	while (cin >> v) {
		a[v]++;
	}

	// 最大値を求める
	int max = 0;

#if 0
	// autoが使えるとき
	for (auto x : a) {
		if (x > max) {
			max = x;
		}
	}
#else
	for (int i = 1; i <= 100; i++) {
		if (a[i] > max) {
			max = a[i];
		}
	}
#endif

	// 最大値になった数（添え字）を表示
	for (int i = 1; i <= 100; i++) {
		if (a[i] == max) {
			cout << i << endl;
		}
	}

#else
	map<int, int> a;
	int v;

	while (cin >> v) {
		a[v]++;
	}

	// 最大値を求める
	int max = 0;
	for ( auto x : a ) {
		if (x.second > max) {
			max = x.second;
		}
	}

	// 最大値を取る値を出力
	vector<int> answer;
	for ( auto x : a ) {
		if ( x.second == max) {
			answer.push_back(x.first);
		}
	}

	// 並べ替え
	sort(answer.begin(), answer.end());
	for ( auto x : answer ) {
		cout << x << endl;
	}

#endif

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n;
	int cnt[101];
	int i,j;
	int max;
	
	for(i=1;i<=100;i++){
		cnt[i]=0;
	}
	while(scanf("%d",&n)!=EOF){
		cnt[n]++;
	}
	max=0;
	for(i=1;i<=100;i++){
		if(cnt[i]>max){
			max=cnt[i];
			j=i;
		}
	}
	printf("%d\n",j);
	for(i=j+1;i<=100;i++){
		if(cnt[i]==max){
			printf("%d\n",i);
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;

int main(){
  int tmp;
  vector<int> v(101,0);
    
  while(cin>>tmp){
    ++v[tmp];
  }

  int max_=0;

  for(int i=0;i<101;++i)
    max_ = max(max_,v[i]);

  for(int i=0;i<101;++i){
    if(v[i]==max_)
      cout<<i<<endl;
  }
  return EXIT_SUCCESS;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a[105] = {},b,c=0;
	while (cin >> b){
		a[b]++;
	}
	for (int i = 0; i < 101; i++){
		if (c < a[b]){
			c = a[b];
		}
	}
	for (int i = 0; i < 101; i++){
		if (a[b] == c)cout << b << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

int main(){
	vector<pair<int,int> > kanri;
	int n,tmpmax;
	bool flag;

	while(cin >> n){
		flag = false;

		if(kanri.empty()){
			kanri.push_back(pair<int,int>(n,1));
			tmpmax = 1;
		}
		else{
			for(vector<pair<int,int> >::iterator it = kanri.begin(); it != kanri.end(); it++){
				if(it->first == n){
					it->second++;
					if(tmpmax < it->second){
						tmpmax = it->second;
					}
					flag = true;
					break;
				}
			}
			if(flag == false){
				kanri.push_back(pair<int,int>(n,1));
				sort(kanri.begin(),kanri.end());
			}
		}
	}

	for(vector<pair<int,int> >::iterator it = kanri.begin(); it != kanri.end(); it++){
		if(it->second == tmpmax){
			cout << it->first << endl;
		}
	}
	

	return 0;
}

C++: #inlcude <stdio.h>

int main(){
    int d[100];
    int maximize[100];

    int buf;
    while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;

    int buff = 0;
    for( int i = 0;i < 100;i++ ){
        if( d[i] > buff ) buff = d[i];
    }

    for( int i = 0;i < 100;i++ ){
        if( d[i] >= buff ) printf( "%d\n",i+1 );
    }
    return 0;
}

C++: #include<algorithm>
#include<iostream>

int c[100];

int main()
{
	int a;
	
	while( std::cin >> a ){
		c[a-1]++;
	}
	
	int c_max = 0;
	for( int i = 0; i < 100; i++ ){
		c_max = std::max( c_max, c[i] );
	}
	
	for( int i = 0; i < 100; i++ ){
		if( c[i] == c_max ){
		 	std::cout << i + 1 << std::endl;
		}
	}

 	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void)
{
    int n;
    int ans[100]={0};
    int kari;
    
    while(cin>>n)
        ans[n]++;
    
    kari=ans[0];
    for(int i=1;i<99;i++)
    {
        if(kari<ans[i])
            kari=ans[i];
    }
    
    for (int i=0; i<100; i++)
    {
        if(kari==ans[i])
            cout<<i<<endl;
    }
    
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int i,m=0;
  int d[100]={};
  while(cin >> i) d[i-1]++;
  for(i=0;i<100;i++) m=max(m,d[i]);
  for(i=0;i<100;i++) if(d[i]==m) cout << (i+1) << endl; 
}

C++: #include <iostream>
#include <vector>
using namespace std;

int main() {
	int n, mode=0;
	vector<int> numbers(101, 0);
	while (cin >> n) {
        numbers[n]++;
        if (numbers[n] > mode) { mode=numbers[n]; }
	}
    for (int i = 0; i != numbers.size(); ++i) {
        if (numbers[i] == mode) { cout << i << endl; }
    }
    return 0;
}

C++: #include <stdio.h>
int main(){
char ch;
int num,max;
int p[10]={0};
int q[2][10]={0};
while(1)
{
	scanf("%c",&ch);
		if(ch=='\0')break;
num=ch-'0';
p[num]++;
}
max=0;
for(int i=0;i<10;i++){
if(max<p[i])max=p[i];
}
for(int i=0;i<10;i++){
if(max==p[i])printf("%d\n",i);
}

return 0;
}

C++: #include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
int a[100],b[100];    
int main() {
	int n,i,j,k=0;
	while(cin >> n) {
       for (i=0;i<k;i++) if (a[i]==n) b[i]++; 
	   if (i==k) { a[k]=n; b[k]=1; k++; }
	}
	for (i=0;i<k;i++) for (j=0;j<i;j++) if (b[j]<b[j+1]) {swap(b[j],b[j+1]); swap(a[j],a[j+1]); }
	for (n=0; b[n]==b[0] && n<k;n++);
	for (i=0;i<n;i++) for (j=0;j<i;j++) if (a[j]>a[j+1]) swap(a[j],a[j+1]);
    for (i=0;i<n;i++) cout << a[i] << endl;
  	return 0;
}