Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var max int

	numbers := map[int]int{}
	for {
		var a int
		_, err := fmt.Scan(&a)
		if err != nil {
			break
		}
		numbers[a]++
		if numbers[a] >= max {
			max = numbers[a]
		}
	}

	var modes []int
	for a, b := range numbers {
		if b == max {
			modes = append(modes, a)
		}
	}

	sort.Ints(modes)
	for _, mode := range modes {
		fmt.Println(mode)
	}
}

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

using namespace std;

int main() {
  map<int, int> num;

  int n = 0;
  while(cin >> n){
    //if(n == -1) break;
    num[n]++;
  }

  int max = 0;
  int max_i = 0;
  map<int, int>::iterator it = num.begin();
  for(; it != num.end(); it++) {
    if(it->second > max_i) {
      max = it->first;
      max_i = it->second;
    }
  }

  for(it = num.begin(); it != num.end(); it++) {
    if(max_i == it->second) {
      cout << it->first << endl;
    }
  }

  return 0;
}

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
	int n;
	while(cin >> n){
		int num[110]={},x,ans1=0,ans2=0;
		for(int i=0;i<n;i++){
			cin >> x;
			num[x]++;
		}
		for(int i=1;i<=100;i++){
			if(num[i]>ans2){
				ans1 = i;
				ans2 = num[i];
			}
		}
		cout << ans1 << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a[100]={},b,c=0;
	while(cin>>b){
		a[b]++;
	}
	for(int i=0;i<100;i++){
		if(c<a[i]){
			c=a[i];
		}
	}
	int i=0;
	for(;i<100;i++){
		if(a[i]==c){
			cout<<i+1<<endl;
		}
	}
	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;
	rep(i,100) {
		if(max < a[i]) max = a[i];
	}
	rep(i,100) {
		if(a[i] == max) {
			cout << i << endl;
		}
	}
	return 0;
}

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	vector<int> a(100,0);
	int n;
	while(cin>>n){
		a[n-1]++;
	}
	int num=0;
	for(int i=0;i<100;i++){
		num = max(num,a[i]);
	}
	for(int i=0;i<100;i++){
		if(a[i] == num) cout<< i+1<< endl;
	}
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<functional>
using namespace std;
int main(){
	int i=0;
	vector<int> a(101),b(101);
	while(cin>>a[i]){
		i++;
	}
	for(int j=1;j<=100;j++){
	b[j-1] = count(a.begin(),a.end(),j);
	}
	int p = *max_element(b.begin(),b.end()) ;

	for(int j=0;j<=100;j++){	
	if(b[j] == p )cout<< j+1<<endl;
	}
		//for(int j=1;j<=100;j++) cout<<j<<"="<<b[j-1]<<endl;
}

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;
  }
}