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 <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
using namespace std;

Int aa[120];

int main(){
	int a  = -1;
	while (cin >> a){
		++aa[a];
	}

	Int b = 0;

	REP(i, 120){
		b = max(b, aa[i]);
	}

	REP(i, 120){
		if (aa[i] == b)
			cout << i << endl;
	}

	return 0;
}

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

#define N 100

int main(void){

	int i;
	int input, max = 0;
	int bucket[N + 1];

	// テゥツ?催・ツ按療」ツ?ョテ・ツ按敕ヲツ慊淌・ツ個?
	for (i = 0; i < N + 1; i++){
		bucket[i] = 0;
	}

	// テ・ツ?・テ・ツ環崚」ツ?ォテ」ツ?療」ツ?淌」ツ?古」ツ?」テ」ツ?ヲテゥツ??ヲツャツ。テゥツ?催・ツ按療」ツつ津」ツつォテ」ツつヲテ」ツδウテ」ツδ暗」ツつ「テ」ツδε」ツδ?
	while (cin >> input){
		bucket[input]++;
	}

	// テ」ツつづ」ツ?」テ」ツ?ィテ」ツつづ・ツ、ツ堙」ツ?湘・ツ?コテ」ツ?淌・ツ崢榲ヲツ閉ーテ」ツつ津ヲツアツづ」ツつ?」ツつ?
	for (i = 0; i < N + 1; i++){
		if (max < bucket[i]){
			max = bucket[i];
		}
	}

	// テ」ツ?敕」ツ?ョテ・ツ崢榲ヲツ閉ーテ」ツ??」ツ?妥・ツ?・テ・ツ環崚」ツ?陛」ツつ古」ツ?淌ヲツ閉ーテ・ツ?、テ」ツつ津・ツ?コテ・ツ環?
	for (i = 0; i < N + 1; i++){
		if (max == bucket[i]){
			printf("%d\n", i);
		}
	}

	return 0;
}

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

C++: #include <stdio.h>
#include<math.h>
using namespace std;

int main(){

	int count[101],tmp,max=-1;
	for(int i=0;i < 101;i++)count[i] = 0;

	while(scanf("%d",&tmp)!=EOF){
		count[tmp]++;
		max = (max >= count[tmp])?max:count[tmp];
	}

	for(int i=0;i<101;i++){
		if(count[i] == max)printf("%d\n",i);
	}
    return 0;
}

C++: #include <iostream>
#include <queue>
using namespace std;
int main()
{
	int num[101]={},a;
	while(cin>>a)num[a]++;
	int m=0;
	queue<int> que;
	for(int i=1;i<=100;i++){
		if(num[i]>m){
			m=num[i];
			while(!que.empty())que.pop();
			que.push(i);
		}else if(num[i]==m){
			que.push(i);
		}
	}
	while(!que.empty()){
		cout<<que.front()<<endl;
		que.pop();
	}
    return 0;
}

C++: #include <math.h>
#include <ctype.h>
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define REP(i, n) for(int i = 0; i < n; i++)
struct omt{omt(){ios::sync_with_stdio(false);cin.tie(0);}}star;

int main(){
    int n;
    map<int, int> mp;

    while(cin >> n){
        mp[n]++;
    }
    
    int ma = 0;
    vector<int> A;
    for(auto x : mp){
        if(x.second > ma){
            A.clear();
            ma = x.second;
            A.push_back(x.first);
        }else if(x.second == ma){
            A.push_back(x.first);
        }
    }
    sort(A.begin(), A.end());
    for(auto x : A) cout << x << endl;


    return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.MV", "r", stdin );
	string str = "";
	map<int,int> cnt; cnt.clear();
	int max_cnt = 0;
	while (getline (cin, str ) ){
		stringstream ss (str );
		int a;
		ss >> a;
		cnt[a]++;
		max_cnt = max (max_cnt, cnt[a] );
	} // end while
	vector<int> res; res.clear();
	map<int,int>::iterator it = cnt.begin();
	for (;it != cnt.end(); it++ ){
		int num = (*it).first;
		int c = (*it).second;
		if (max_cnt == c ){
			res.push_back (num );
		} // end if
	} // end for
	sort (ALL (res ) );
	rep (i, res.size() ){
		cout << res[i] << endl;
	} // end rep
		
	return 0;
}

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

int main()
{
	int val[100] = {0};
	int i;
	while(cin >> i){
		val[i]++;
	}
	int rec=0;
	for(int i=0;i<100;i++)
		rec = max(rec,val[i]);
	for(int i=0;i<100;i++)
		if(val[i]==rec)
			cout << i << endl;
	return 0;
}

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