Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

type Pair struct {
	key   int
	value int
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for {
		n, err := nextInt()
		if err != nil {
			break
		}

		counts[n]++
	}

	pairs := []Pair{}
	for k, v := range counts {
		pairs = append(pairs, Pair{k, v})
	}
	sort.Slice(pairs, func(i, j int) bool {
		if pairs[i].value == pairs[j].value {
			return pairs[i].key < pairs[j].key
		}
		return pairs[i].value > pairs[j].value
	})

	vMax := 0
	for _, pair := range pairs {
		if vMax != 0 && vMax != pair.value {
			break
		}
		if pair.value > vMax {
			vMax = pair.value
		}
		fmt.Println(pair.key)
	}
}

C++: #include <iostream>
#include <array>
#include <algorithm>
#include <iterator>
#include <cstdint>

int main()
{
	typedef std::array<std::uint16_t, 100> DataArray;
	DataArray datas;
	datas.fill(0);

	std::uint16_t max_occurence = 0;
	std::uint16_t num;
	while (std::cin >> num) {
		max_occurence = std::max(max_occurence, ++datas[num - 1]);
	}

	for (DataArray::const_iterator pos =
			std::find(datas.cbegin(), datas.cend(), max_occurence);
		 pos != datas.end();
		 pos = std::find(pos, datas.cend(), max_occurence)) {
			std::cout << std::distance(datas.cbegin(), ++pos) << std::endl;
	}

	return 0;
}

C++: #include <stdio.h>

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

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

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

  return 0;
}

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

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

int main()
{
	std::vector<int> hist(100, 0);

	int index = 0;
	int max = 0;
	while (std::cin >> index)
	{
		hist[index - 1]++;
		if (max < hist[index - 1])
		{
			max = hist[index - 1];
		}
	}

	int i = 1;
	for (const auto& h : hist)
	{
		if (h == max)
		{
			std::cout << i << std::endl;
		}
		++i;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;
#define rep2(x,from,to) for(int x=(from); x<(to); (x)++)
#define rep(x,to) rep2(x,0,to)
int main() {
	int n, a[101];
	while(cin >> n) {
		a[n]++;
	}
	int max = 0;
	rep2(i,1,100) {
		if(max < a[i]) max = a[i];
	}
	rep2(i,1,100) {
		if(a[i] == max) {
			cout << i << endl;
		}
	}
	return 0;
}

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

int main(){
    int n;
    vector<int> f(101, 0);
    while (1){
	cin >> n;
	if (cin.eof()) break;
	f[n]++;
    }
    int max = 0;
    for (int i = 0; i < f.size(); i++) if (max < f[i]) max = f[i];
    for (int i = 0; i < f.size(); i++) if (f[i] == max) cout << i << endl;
}

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

int main(void){
    int count[101]={0};
    int a;
    while(cin>>a){
        count[a]+=1;
    }
    int max=0;
    for(int i=1;i<=100;i++){
        if (count[i]>max){
            max=count[i];
        }
    }
    for(int i=1;i<=100;i++){
        if(count[i]==max){
            cout<<i<<endl;
        }
    }
    return 0;
}

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑


int ans[105], mon;
int main() {
	int n;
	while (cin >> n) {
		++ans[n];
	}
	for (int i = 0; i < 100; ++i) {
		mon = max(mon, ans[i]);
	}
	for (int i = 0; i < 100; ++i) {
		if (ans[i] == mon) { cout << i + 1 << endl; }
	}
}

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

C++: #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 50//00
#define MIN -100001
#define _MAX 100
#define g 9.8
#define d 4.9
int main(void)
{
	int a[_MAX] = { 0 }, x, max = 0;
	while (scanf_s("%d", &x) != EOF) {
		++a[x - 1];
		if (a[x - 1] > max) max = a[x - 1];
	}
	for (int i = 0; i < _MAX; ++i) {
		if (a[i] == max) {
			printf("%d\n", i + 1);
		}
	}s
}

C++: #include<iostream>

using namespace std;

int list[101];

int main(){
  int n, i, max=101;
  while(cin >> n){
    list[n]+=1;
  }
  for(i=1; i<101; i++){
    if(list[i] >= max)max=list[i];
  }
  for(i=1; i<101; i++){
    if(list[i] == max)cout << i << endl;
  }
}

C++: #include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;

int main(void){
	int n,a[101],m=0;
	rep(i,1,101){
		a[i]=0;
	}
	while( cin >> n ){
		a[n]++;
	}
	rep(i,1,101){
		if(m < a[i]){
			m=a[i];
		}
	}
	rep(i,1,101){
		if(m == a[i]){
			cout << a[i] << "\n";
		}
	}
	return 0;
}

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

int main() {
	int a[100], m[100] = {}, i = -1, mode = 0;
	while (cin >> a[++i]) {
		m[a[i]]++;
		if (mode < m[a[i]])
			mode = m[a[i]];
	}
	for (int j = 0; j < 100; j++) {
		if (mode == m[j])
			cout << j << endl;
	}
	return 0;
}

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

using namespace std;


signed main()
{   
    int mp[101] = {0};
    int key, j = 0;
    while ( scanf("%d\n", &key ) != EOF )
    {
        mp[ key ]++;
    }
    int mode = 0;
    for( int i = 1; i <= 100; i++ )
    {
        if( mode < mp[i] )
        {
            mode = mp[i];
        }
    }
    
    ///mode_value
    for( int i = 1; i <= 100; i++ )
    {
        if( mp[i] == mode )
        {
            cout << i + 1 << endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <iostream>
 
using namespace std;
 
int main() {
 
    int counter[101] = {0};
    int a;
    int MAX = 0;
    int i = 0;
     
    while (cin >> a) {
        counter[a]++;
    }
 
    for (int j = 1; j < 101; j++) {
        MAX = max(MAX, counter[j]);
    }
 
    for (int k = 1; k < 101; k++) {
        if (MAX == counter[k]) {
            cout << k << endl;
        }
    }
 
    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define INF 1000000
using namespace std;
int main(){
    vector<int> vec(110,0);
    int n;
    while(cin >> n){
        vec[n]++;
        int tmp = 0;
        rep(i,vec.size()){
            tmp = max(tmp,vec[i]);
        }
        vector<int> ans;
        rep(i,vec.size()){
            if(tmp == vec[i]) ans.push_back(i);
        }
        sort(ans.begin(),ans.end());
        rep(i,ans.size()) cout << ans[i] << endl;
    }
    return 0;
}