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 <cstdio>
#include <vector>

using namespace std;

int main(){
vector<int> data(101,0);
int v;
while(scanf("%d",&v)!=-1)data[v]++;
int mxvl=0;
vector<int> res;
for(int i=0;i<=100;++i;){
if(mxvl < data[i]){
mxvl = data[i];
res.clear();
}
if(mxvl == data[i])res.push_back(i);
}
for(int i=0;i<res.size();++i)printf("%d\n",res[i]);
return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
int a[100];
int b;
b=0;
while(b<100){
a[b]=0;}
int n;
while(cin >>n){
a[n]=a[n]+1;}
int c;
c=0;
b=0;
while(b<100){
if(a[b]>c){c=a[b];}
b=b+1;}
b=0;
while(b<100){
if(c==a[b]){cout <<b<<endl;}
b=b+1;}
}

C++: #include<iostream>

using namespace std;

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

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

int main() {
    map<int, int> cnt;
    int x;
    while (scanf("%d", &x) != EOF) cnt[x]++;
    int m = 0;
    for (map<int, int>::iterator it = cnt.begin(); it != cnt.end(); ++it) {
        if (m < it->second) m = it->second;
    }
    for (map<int, int>::iterator it = cnt.begin(); it != cnt.end(); ++it) {
        if (m == it->second) printf("%d\n", it->first);
    }
    return 0;
}

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

int main()
{
    int data;
    int a[101] = {};

    while( cin >> data )
        a[data]++;
        
    int max = 0;
    for( int i = 1; i < 101; i++ )
        if( max < a[i] )
            max = a[i];

    for( int i = 1; i < 101; i++ )
        if( max == a[i] )
            cout << i << endl;
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int bucket[101]={0};

int main(){
    int n;
    while(scanf("%d",&n) != EOF){
        bucket[n]++;
    }
    int maxi=0;
    for(int i=1;i<=100;++i){
        maxi = max(maxi, bucket[i]);
    }
    for(int i=1;i<=100;++i){
        if(bucket[i] == maxi){
            cout << i << endl;
        }
    }

    return 0;
}

C++: #include<stdio.h>

int main(void){
	int a,n[101]={0},m=0;
	while(~scanf("%d",&a)){
		n[a]++;
		m=m>n[a]?m:n[a];
	}
	for(int i=0;i<101;i++)if(m==n[i])printf("%d\n",i);
	return 0;
}

C++: #include<iostream>

using namespace std;

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

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

int main()
{
    int size = 101;
    vector<int> numbers(size, 0);
    vector<int> result;

    for (int n; cin >> n;)
        numbers[n]++;

    int max = 0;
    for (int i = 0; i < size; i++)
        if (numbers[i] == max)
            result.push_back(i);
        else if (numbers[i] > max) {
            max = numbers[i];
            result.clear();
            result.push_back(i);
        }

    for (int n: result)
        cout << n << endl;

    return 0;
}

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

int main() {
  int x,data[101] = {0},top;

  while(cin >> x) {
    data[x]++;
  }

  top = *max_element(data,data+101);

  for(int i=1;i<101;i++) {
    if(data[i] == top)
     cout << i << endl;
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    vector<int> cnt(101);
    int a;
    int ma_cnt = 0;
    while(cin >> a) {
        ma_cnt = max(ma_cnt, ++cnt[a]);
    }
    vector<int> res;
    for(int i=0; i<101; ++i) {
        if(cnt[i] == ma_cnt) {
            cout << i << endl;
        }
    }
}

C++: 
#include<iostream>
using namespace std;
int main(){
int a[10000]={0},au[30];
	int i,j,s;
	int c=0,t=0;
	while(cin>>s){
		a[s]++;
		c++;
	}
	int max=0;
	for(i=0;i<c;i++){
		if(max<a[i]){
			max=a[i];
			au[0]=i;
			t=1;
		}
		else if(max==a[i]){
			au[t]=i;
			t++;
		}
	}
	for(i=0;i<t;i++){
		cout<<au[i]<<endl;
	}
	return 0;
}

C++: #include <fstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
using namespace std;

int main() {
  int a[101];
  for (int i = 0; i < 101; i++) {
    a[i] = 0;
  }

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

  int mx = 0;
  for (int i = 1; i < 101; i++) {
    mx = max(mx, a[i]);
  }

  for (int i = 1; i < 101; i++) {
    if (a[i] == mx)
      cout << i << endl;
  }
}

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

using namespace std;

int hindo[100];

int main()
{
  int n;
  while (scanf("%d ", &n) == 1) {
    hindo[n - 1]++;
  }
  
  int mx = 0;
  for (int i = 0; i < 100; i++) {
    mx = max(hindo[i], mx);
  }
  for (int i = 0; i < 100; i++) {
    if (mx == hindo[i]) {
      printf("%d\n", i + 1);
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
	int n, max=0, ans[100];
	vector<int> s;
	for(int i=0; i<100; i++)
		ans[i] = 0;
	while(cin >> n){
		if(n > 100 || n < 1) return 0;
		s.push_back(n);
	}
	sort(s.begin(), s.end());
	vector<int>::iterator it = s.begin();
	while(it != s.end()){
		ans[*it-1]++;
		it++;
	}
	for(int i=0; i<100; i++)
		if(max < ans[i]) max = ans[i];
	for(int i=0; i<100; i++)
		if(max == ans[i]) cout << i+1 << endl;
}

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

#define ll long long
#define LL long long
#define ULL unsigned long long 
#define ull unsigned long long 
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)
#define int(x) int x;scanf("%d",&x);
#define double(x) double x;scanf("%lf",&x);
#define string(x) double string;cin>>x;

using namespace std;

int main()
{
	int num;
	int data[100]={};
	int ans;
/*	for (int j = 0; j < 100; j++) {
		data[j] = j;
	}*/
	int i=0;
	
	while (cin >> num)
	{
		data[num]++;
		i++;
	}
	int tmp = 0;
	//sort(num, num + i);
	for (int j = 0; j < i; j++) {
		if (data[j] > tmp)
		{
			ans = j;
			tmp = data[j];
		}
	}

	cout << ans << endl;

	for (int j = 0; j < i; j++) {
		if (data[ans]==data[j]&&j!=ans)
		{
			cout << j << endl;
		}
	}


	return 0;
}

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

int main(void){
  int memo[101] = {0};
  int n, max = 0;

  while(cin >> n)
    memo[n]++;

  for(int i = 0; i < 101; i++)
    if(max < memo[i])
      max = memo[i];

  for(int i = 0; i < 101; i++)
    if(memo[i] == max)
      cout << i << endl;

  return 0;
}