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 <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main() {
	int x, m;
	vector<int> a(101, 0);
	while(cin >> x){
		a[x] += 1;
	}
	m = *(max_element(a.begin(), a.end()));
	for(int i = 1;i <= 100;++i){
		if(a[i] == m) {
			cout << i << endl;
		}
	}
	return 0;
}

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

#define N 100
#define MYSCAN scanf_s

int main(void){

	int i;
	int input, max = 0;
	int bucket[N + 1];

	// テゥツ?催・ツ按療」ツ?ョテ・ツ按敕ヲツ慊淌・ツ個?
	for (int i = 0; i < N + 1; i++){
		bucket[i] = 0;
	}

	// テ・ツ?・テ・ツ環崚」ツ?ォテ」ツ?療」ツ?淌」ツ?古」ツ?」テ」ツ?ヲテゥツ??ヲツャツ。テゥツ?催・ツ按療」ツつ津」ツつォテ」ツつヲテ」ツδウテ」ツδ暗」ツつ「テ」ツδε」ツδ?
	while (MYSCAN("%d", &input) != EOF){
		bucket[input]++;
	}

	// テ」ツつづ」ツ?」テ」ツ?ィテ」ツつづ・ツ、ツ堙」ツ?湘・ツ?コテ」ツ?淌・ツ崢榲ヲツ閉ーテ」ツつ津ヲツアツづ」ツつ?」ツつ?
	for (int i = 0; i < N + 1; i++){
		if (max < bucket[i]){
			max = bucket[i];
		}
	}

	// テ」ツ?敕」ツ?ョテ・ツ崢榲ヲツ閉ーテ」ツ??」ツ?妥・ツ?・テ・ツ環崚」ツ?陛」ツつ古」ツ?淌ヲツ閉ーテ・ツ?、テ」ツつ津・ツ?コテ・ツ環?
	for (int i = 0; i < N + 1; i++){
		if (max == bucket[i]){
			printf("%d\n", i);
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
#define loop(i,a,b) for(int i=(a); i<int(b); i++)
#define rep(i,b) loop(i,0,b)

int main(){
	int a[101];
	rep(i, 101) a[i] = 0;
	int n;
	int m = 0;
	while(cin >> n){
		a[n]++;
		m = max(m, a[n]);
	}
	rep(i, 101) if(m == a[i]) cout << i << endl;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

typedef istringstream ISS;
typedef ostringstream OSS;
typedef vector <string> VS;
typedef vector <int> VI;
typedef vector <VI> VVI;
template <class T> T gcd( T a, T b ) { return !b ? a : gcd( b, a % b ); }
template <class T> T lcm( T a, T b ){ return a / gcd( a, b ) * b; }
template <class T> string print_v( vector<T> v ) { OSS oss; for ( typename vector<T>::iterator it_i = v.begin(); it_i != v.end(); ++ it_i ) { oss << *it_i << ", "; } return oss.str(); }

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

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

int main(void) {
    int n = 0, i, a[100], b[101] = {};
    while(cin >> i)
        a[n++] = i;
    for (int i= 0; i < n; ++i)
        ++b[a[i]];
    int max = 0;
    for (int i = 1; i <= 100; ++i)
        if (b[i] > max)
            max = b[i];

    for (int i = 1; i <= 100; ++i)
        if (max == b[i])
            cout << i << endl;

    return 0;
}

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

#define NOT_FOUND -1

int GetContainsElement(const vector<pair<int, int>> v, int target)
{
    int i = 0;
    for (vector<pair<int, int>>::const_iterator it = v.begin(); it != v.end(); it++) {
        if (it->first == target) {
            return i;
        }
        i++;
    }

    return NOT_FOUND;
}

int GetMostfrequentlyNumber(const vector<pair<int, int>> v)
{
    int ret = v[0].second;
    for (vector<pair<int, int>>::const_iterator it = (v.begin() + 1); it != v.end(); it++) {
        if (ret < it->second) {
            ret = it->second;
        }
    }

    return ret;
}

int main()
{
    int n = 0;
    vector<pair<int, int>> vec;

    while (scanf("%d", &n) != EOF) {
        int idx = GetContainsElement(vec, n);
        if (NOT_FOUND == idx) {
            vec.push_back(make_pair(n, 0));
        }
        else {
            vec[idx].second++;
        }
    }

    sort(vec.begin(), vec.end());
    int mostFrequently = GetMostfrequentlyNumber(vec);

    for (vector<pair<int, int>>::const_iterator it = vec.begin(); it != vec.end(); it++) {
        if (mostFrequently == it->second) {
            printf("%d\n", it->first);
        }
    }

    return 0;
}

C++: #include<cstdio>


using namespace std;
int main(void)
{
	int a[101]= {0},kari,most = 0;
	for(int i = 0;;i++)
	{
		if(scanf("%d",&kari)==EOF) break;
		a[kari] += 1;
		if(a[kari] >= most) most = a[kari];
	}
	for(int i = 0;i < 100;i++)
	{
		if(most == a[i]) printf("%d\n",i);
	}


	return 0;
}

C++: #include<iostream>
#include<cstdlib>
using namespace std;
int compare(const void *a,const void *b){
	return *(int *)a-*(int *)b;
}
int main(){
	int n,a[200][2],k=0,b[200],max=0,d=0,i;
	for(i=0;i<200;i++)
	a[i][1]=0;
	while(cin>>n){
		for(i=0;i<k;i++)
		if(a[i][0]==n){
			a[i][1]++;
			break;
		}
		if(i==k){
			a[k][0]=n;
			a[k++][1]++;
		}
	}
	for(i=0;i<k;i++)
		if(a[i][1]>max)
			max=a[i][1];
	for(i=0;i<k;i++)
		if(max==a[i][1])
			b[d++]=a[i][0];
	qsort(b,d,sizeof(int),compare);
	for(i=0;i<d;i++)
		cout<<b[i]<<endl;
	return 0;
}

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

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int a[100] = {0};
  int n;
  int len = 0;
  while(cin>>n){
    a[n-1] ++;
  }
  int max = -1;
  vector<int> res;
   rep(i,100){
    if(a[i] > max){
 
      max = a[i];
      res.clear();
      res.pb(i);
    }
    if(a[i] == max)res.pb(i);
  }
  rep(i,res.size())cout<<res[i]+1<<endl;

}

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

int main(void){
  int n, m=0;
  map<int,int> mode; //保存する変数の値,入力された回数
  vector<int> ans;

  for(int i=1; i<=100; i++){ //保存先の確保と初期化
    mode.insert( map<int,int>::value_type(i, 0));
  }

  while(cin >> n){ //入力回数をカウント
    mode[n] += 1;
  }

  for(int i=1; i<=100; i++){ //最も入力が多い数の回数
    m = max( mode[i], m );
  }

  for(int i=1; i<=100; i++){ //最頻値の取り出し
    if(m==mode[i]){
      ans.push_back(i);
    }
  }

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

  for(int i=0; i<ans.size(); i++){
    cout << ans[i] << endl;
  }

  return 0;
}

C++: #include "bits/stdc++.h"
#pragma warning(disable:4996)
using namespace std;

int main() {
	int a;
	map<int, int>mp;
	while (cin >> a) {
		mp[a]++;
	}
	int amax = 0;
	vector<int>anss;
	for (auto m : mp) {
		if (m.second > amax) {
			anss.clear();
			amax = m.second;
		}
		if (m.second == amax) {
			anss.push_back(m.first);
			
		}
	}
	sort(anss.begin(), anss.end());
	for (auto ans : anss) {
		cout << ans << endl;
	}
	return 0;
}

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

using namespace std;

int main(){
	int num;
	int list[100] = {0};

	while (cin >> num){
		list[num]++;
	}

	sort(list, list + 100);

	cout << list[99] << endl;
	
	for (;;){
		int i = 98;
		if (list[i] == list[i + 1]){
			cout << list[i] << endl;
		}
		else {
			break;
		}
		i--;
	}

	return 0;
}