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<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

const int MAX_N = 100;
int a[MAX_N];
int x;
int mx;

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

  rep(i, MAX_N) maxup(mx, a[i]);

  rep(i, MAX_N) if(mx == a[i]) cout << i + 1 << endl;

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int n,MAX=0;
  map<int,int> mp;
  while(cin >> n){
    mp[n]++;
    MAX=max(MAX,mp[n]);
  }
  for(int i=1;i<=100;i++){
    if(mp[i]==MAX){
      cout << i << endl;
    }
  }
  return 0;
}

C++: #include <stdio.h>

int main()
{
	int val[100], val2[100], k, i, j, t, s;

	i = 0;
	while(scanf("%d", &val[i]) != EOF){
		for (j = 0; j <= i; j++){
			if(val[j] > val[i]){
				t = val[j];
				val[j] = val[i];
				val[i] = t;
			}
		}

		i++;
	}

	i = 0;
	j = 1;
	t = 0;
	k = 0;
	s = 1;
	while(val[i] != '\0'){
		if (t == val[i]) j++;
		else{
			if(s == j) {k++; val2[k] = val[i-1];}
			else if(s < j) {s = j; k = 0; val2[k] = val[i-1];}
			t = val[i]; j = 1;
		}

		i++;
	}

	i = 0;
	while(val2[i] != '\0'){
		printf("%d\n", val2[i]);
		i++;
	}

	return 0;
}

C++: #include <iostream>

int main(){
	int a,c=0,t=0;
	int b[101],f[101],z[101];
	z[0]=0;
	
	while(std::cin>>a){
         c++;
	    b[c]=a;
	}
	for(int g=1;g<=100;g++){
		f[g]=0;
		z[g]=0;
	}

	for(int d=1;d<=c;d++){
			f[b[d]]++;
			}
	
	for(int g=1;g<=100;g++){
		
			if(f[g]>z[0]){
			
			z[0]=g;
				t=0;
			}else if(f[g]==z[0]){
				t++;
			
				z[t]=g;
		}
	}
	
	for(int p=0;p<=t;p++){
		std::cout<<z[p]<<std::endl;
	}
	return 0;
		}

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
 
 int arr[101]={0};
  
 int main()
 {
   int N;
   int max=0;
   while(cin>>N) arr[N]++;
   for(int i=1;i<=100;i++) if(arr[i]>max) max=arr[i];
   for(int i=1;i<=100;i++) if(arr[i]==max) cout<<i<<endl;             
   //while(1);     
   return 0;  
 }

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

struct value{
  int value_;
  int frequency;

  bool operator<(const value &value__) const {
    return frequency > value__.frequency;
  }

};

int main(){
  int tmp;
  vector<value> v(101);
  for(int i=0;i<101;++i){
    v[i].value_=i;
    v[i].frequency=0;
  }

  while(cin>>tmp){
    ++v[tmp].frequency;
  }

  sort(v.begin(),v.end());

  for(int i=0;i<101;++i){
    if(i>0){
      if(v[i].frequency!=v[i-1].frequency)
        break;
    }
    cout<<v[i].value_<<endl;
  }

  return EXIT_SUCCESS;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int a[100]={0};
	int b[100][2]={0};
	int B1,B2;
	int i=0;
	for(int h=0;h<100;h++)
	{
		b[h][1]=h+1;
	}
while (cin>>a[i])
{
	b[a[1]-1][0]++;
	i++;
}
for(int j=0;j<i;j++)
{
	for(int k=i-1;j<=j+1;j++)
	{
		if(b[i][0]>b[j][0])
		{
			B1=b[i][0];
			b[i][0]=b[j][0];
			b[j][0]=B1;
			B2=b[i][1];
			b[i][1]=b[j][1];
			b[j][1]=B2;
		}
	}
}
int l=0;
while(b[l][0]==b[0][0])
{
	cout<<b[l][1]<<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
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);
		}
	}
}

C++: #include <iostream>

int main(void) {
    int a;
    int count[100] = {};
    int max = 0;
    while(std::cin >> a) {
        count[a - 1]++;
    }
    for (int i = 0; i < 100; i++) {
        if (count[i] > max) {
            max = count[i];
        }
    }

    for (int i = 0; i < 100; i++) {
        if (count[i] ==  max) {
            std::cout << i + 1 << std::endl;
        }
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
const int MAX = (int)2e5 + 5;

int main() {
	map<int, int> m;
	int v;
	while (cin >> v) {
		m[v]++;
	}
	vector<pair<int,int>> vec;
	for (auto p : m) {
		vec.push_back({ p.second, p.first });
	}
	sort(ALL(vec));
	rep(i,vec.size()) {
		if (vec[i].first == vec.back().first) {
			cout << vec[i].second << endl;
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
 
typedef long long ll;
typedef pair<int, int> ii;

#define EPS 1e-8

int main(){
	
	map<int, int> mp;
	
	int a, maxi = 0;
	while(cin >> a){
		mp[a]++;
		maxi = max(maxi, mp[a]);
	}
	for(auto it : mp){
		if(maxi == it.second) cout << it.first << endl;
	}

	
	return 0;
}

C++: #include<cstdio>
#include<map>
using namespace std;
int main(){
  int n;
  map<int,int> m;
  while(scanf("%d",&n)>0){
    int &i = m[n];
    if(i == 0) i=1;
    else i++;
  }
  int max=0;
  for(auto i:m)
    if(max < i.second)
      max=i.second;
  for(auto i:m)
    if(max==i.second)
      printf("%d\n",i.first);
}

C++: #include <stdio.h>
#include<math.h>
#include <string.h>
#include <ctype.h>

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

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

using namespace std;

int main()
{
    vector <int> input(100, 0);
    int num;
    
    while (cin >> num) 
        input[num - 1]++;

    int max = 0;
    for (int i = 0; i < input.size(); i++) 
        if (input[i] > max)
            max = input[i];

    for (int i = 0; i < input.size(); i++)
        if (input[i] == max)
            cout << i + 1 << endl;

    return 0;
}

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

using namespace std;

int main() {

	int a, max1=0,b[101] = {};

	while (CI a) {
		b[a]++;
		max1 = max(b[a], max1);
	}

	for (int i = 0; i < 101; i++) {
		if (b[i] == max1)CO i EN;
	}

	return 0;
}