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 <cstdio>
#include <cstdlib>
#include <iostream>

using namespace std;

const int N = 100;

int n[N];
struct number {
	int cs;
	int value;
}num[N];

int cmp(const void *a, const void *b) {
	return *(int *)a - *(int *)b;
}

int cmp1(const void *a, const void *b) {
	number *c = (number *)a;
	number *d = (number *)b;
	if (c->cs != d->cs) return d->cs - c->cs;
	return c->value - d->value;
}

int main() {
	int k = 0, i = 0, maxs = -1;
	while (scanf("%d", &n[i++]) != EOF);//注意，i&#20540;比&#36755;入的整数个数大1 
	qsort(n, --i, sizeof(int), cmp);//i&#20540;要&#20943;一 
	num[k].cs = 1;
	num[k].value = n[0];
	for (int j=1; j<i; ++j) {//&#32479;&#35745;&#27599;个数出&#29616;的个数，并保存&#35813;数及其个数 
		if (num[k].value == n[j]) ++num[k].cs;
		else {
			if (num[k].cs > maxs) maxs = num[k].cs;
			++k;
			num[k].cs = 1;
			num[k].value = n[j];
		}
	}
	if (num[k].cs > maxs) maxs = num[k].cs;
	qsort(num, k+1, sizeof(number), cmp1);
	for (int j=0; j<=k; ++j) {//&#36755;出答案 
		if (num[j].cs == maxs) printf ("%d\n", num[j].value);
		else break;
	}
	return 0;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>
#include <string>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return 0;
	}
#endif
	/*****変数置き場*****/
	int i=0;
	int num;
	int appear[100];
	int max;
	/*****処理部*****/
	max = 0;
	for(int i=0;i<100;i++)	appear[i] = 0;
	while(!cin.eof()){
		cin >> num;
		//cin >> num;
		appear[num] += 1;
	}
	for(int i=0;i<100;i++)
		if(appear[i] > max)	max = appear[i];
	for(int i=0;i<100;i++)
		if(appear[i] == max)
			cout << i << endl;
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

C++: #include<iostream>
int main()
{
	int appear[100];
	for (int i = 0; i < 100; i++)
	{
		appear[i] = 0;
	}
	int max = 0;
	for (int num; std::cin >> num;)
	{
		appear[num - 1]++;
		if (max < appear[num - 1])
		{
			max = appear[num - 1];
		}
	}
	for (int i = 0; i < 100; i++)
	{
		if (appear[i] == max)
		{
			std::cout << i + 1 << std::endl;
		}
	}
	return 0;
}

C++: #include<stdio.h>
int a[100];
int main(){
	int now;
	int max=0;
	while(~scanf("%d",&now)){
		a[now-1]++;
		if(a[now-1]>max)max=a[now-1];
	}
	for(int i=0;i<100;i++){
		if(a[i]==max)printf("%d\n",1+i);
	}
}

C++: #include<iostream>
using namespace std;
int main()
{
	int a[100+1]={0};
	int t;
	while(~scanf("%d",&t))
	a[t]++;
	int max=0;
	for(int i=0;i<101;i++)
	if(a[i]>max) max=a[i];
	for(int i=0;i<101;i++)
	if(a[i]==max) cout<<i<<endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>

using namespace std;

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

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
#include<sstream>
#include<iterator>
#include<list>

using namespace std;

typedef  long long int lint;

#define rep(i, n) for (lint i = 0; i < n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
#define llower(v,hoge) *lower_bound(v.begin(), v.end(), hoge)
#define lupper(v,hoge) *upper_bound(v.begin(), v.end(), hoge)
#define mp make_pair
#define IP pair<int,int>
#define enld endl

int main() {
	vector<int>A(100);
	int a;
	while (cin >> a) {
		A[a - 1]++;
	}
	int M = -1;
	rep(i, 100) {
		M = max(M, A[i]);
	}
	rep(i, 100) {
		if (M == A[i]) {
			cout << i + 1 << endl;
		}
	}
}

C++: #include<string>
#include<cstdio>
#include<iostream>

using namespace std;
 
int main(){
	int a[101]={0};
	int i, max=0;

	while(scanf("%d",&i)!=EOF)
		if(max<++a[i]) max=a[i];

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

    return 0;
}

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

using namespace std;

void solve()
{
	multiset<int> ms;
	int n;
	while(cin >> n)
	{
		ms.insert(n);
	}
	int max = 0;
	for(int i = 1; i < 101; ++i)
	{
		if(max < ms.count(i))
		{
			max = ms.count(i);
		}
	}
	for(int i = 1; i < 101; ++i)
	{
		if(max == ms.count(i))
		{
			cout << i << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include<iostream>

using namespace std;

int main(){
	int n,max=0;
	int in[10]={0};
	while(cin>>n){
		in[n]++;
		if(max<in[n])max=in[n];
	}
	
	for(int j=0;j<10;j++){
		if(max==in[j])cout<<j<<endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int times[10]={0};
	char num[5];
	while(cin >> num){
		times[num[0] - '0']++;
	}
	int maxtimes = 0;
	for(int i = 0;i < 10;i++){
		if(times[i] > maxtimes) maxtimes = times[i];
	}
	int maxnum[10]={0};
	int ptr=0;
	for(int i = 0; i < 10; i++){
		if(times[i]==maxtimes){
			maxnum[ptr++] = i;
		}
	}
	for(int i=0; i< ptr; i++){
		cout << maxnum[i] << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<map>
using namespace std;
map<int,int>mp;
int main()
{	
	int a,b[100]={0},i=0,maxn=0;
	while(cin>>a)
	{
	    mp[a]++;
		if(mp[a]==1)
		{
			b[i]=a;
			
			i++;		
		}        	
		if(mp[a]>maxn)maxn=mp[a];
		
	}
	for(int j=0;j<i;j++)
	{
		if(mp[b[j]]==maxn)cout<<b[j]<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n, m = 0;
int a[101];
vector<int> ans;
for(int i=1 ; i <= 100 ; i++){
a[i] = 0;
}
while( cin >> n ){
a[n]++;
}
for(int i=1 ; i <= 100 ; i++){
m = max( a[i] , m );
}
for(int i=1 ; i <= 100 ; i++){
if( m == a[i] ) ans.push_back(i);
}
for(int i=0 ; i < ans.size() ; i++ ){
cout << ans[i] << endl;
}
}

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

using namespace std;

int main()
{
	int i;
	map<int,int> mp;
	while(cin>>i){
		if(!mp.count(i))	mp.insert(make_pair(i,0));
		else				mp.find(i)->second++;
	}

	int vmax=-1e9;
	map<int,int>::iterator it;
	for(it=mp.begin();it!=mp.end();it++)vmax=max(vmax,it->second);
	for(it=mp.begin();it!=mp.end();it++)if(it->second==vmax)printf("%d\n",it->first);

	return 0;
}