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 <cstdio>
#include <string>
#include <algorithm>
#include <math.h>

//#define PI 3.141592653589

using namespace std;



int main()
{
	int dic[10];
	int data;
	int max_data = 0;
	
	for (int i=0; i<10; i++) dic[i] = 0;
	while (cin >> data)
	{
		dic[data]++;
		max_data = max(max_data, dic[data]);
	}
	for (int i=0; i<10; i++)
	{
		if (dic[i] == max_data)
		{
			cout << i << endl;
		}
	}
	
	return 0;
}

C++: #include<iostream>

using namespace std;

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

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

int main(){
  int n;
  map<int, int> mp;
  while (cin >> n){
    mp[n]++;
  }
  int maxnum = 1;
  for (auto m:mp) {
    maxnum = max(m.second, maxnum);
  }
  for (auto m:mp) {
    if (maxnum == m.second)
    cout << m.first << endl;
  }
}

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(101);
    rep(i,101) vec[i] = 0;
    int n,tmp=0;
    while(cin >> n){
        vec[n]++;
        rep(i,vec.size()){
            if(tmp <= vec[i]) 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;
}

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

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


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

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

int ar[120] = {};
int b[120] = {};

int main() {
	int n;
	int ca = 0;
	while (cin >> n) {
		ar[n - 1]++;
		b[n - 1]++;
		ca++;
	}

	sort(b, b + ca);
	int max = b[ca - 1];
	for (int i = 0; i < ca; i++) {
		if (ar[i] == max) {
			cout << i+1 << endl;
		}
	}
	return 0;
}

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

using namespace std;

int main(){
  int input=0;
  int a[100];
  int b[100][2];
  for(int i=0;i<100;i++){
    for(int j=0;j<2;j++){
      b[i][j]=0;
    }
  }
  int n=0;
  while(cin>>input){
    a[n]=input;
    n++;
  }
  sort(a,a+n);
  int i=0,j=0;
  for(i=0;i<n;i++){
    if(i==0){
      b[0][0]=a[0];
      b[0][1]++;
    }
    else if(b[j][0]==a[i]){
      b[j][1]++;
    }
    else{
      b[++j][0]=a[i];
      b[j][1]++;
    }
  }
  int max=b[0][1];
  for(int k=0;k<=j;k++){
    if(max<b[k][1]){
      max=b[k][1];
    }
  }
  int out[100];
  int m=0;
  for(int k=0;k<=j;k++){
    if(max==b[k][1]){
      out[m]=b[k][0];
      m++;
    }
  }
  for(int p=0;p<m;p++){
    cout<<out[p]<<"\n";
  }
  return 0;
}

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

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

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

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

C++: #include<iostream>
using namespace std;
int main() {
	int a, b[111], i, z, dai;
	dai = 0;
	i = 1;
	for (i = 1; i <= 100; i++) {
		b[i] = 0;
	}
	while (cin >> a) {
		b[a]++;
	}
	for (i = 1; i <= 100; i++) {
		if (dai < b[i]) {
			dai = b[i];
		}
	}
	for (i = 1; i <= 100; i++) {
		if (dai == b[i]) {
			cout << i << endl;
		}
	}
}

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

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

#define SIZE 300005
#define MOD 1000000007LL
#define INF INT_MAX / 3
#define LLINF 1LL << 60
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)
#define SET(a,c) memset(a,c,sizeof a)
#define FORALL(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique((o).begin(),(o).end()), (o).end())
#define SQ(x) ((x)*(x))
using namespace std;
typedef long long ll;
typedef valarray<int> Array;
typedef pair<ll,ll> Pll;
typedef pair<int, int> Pii;
typedef pair<double, double> Pdd;
template<typename T> inline void priv(vector<T>a){REP(i,a.size()){cout<<a[i];if(i==a.size()-1)cout<<endl;else cout<<" ";}}
int gcd(int a,int b){int c=max(a,b);int d=min(a,b);return c==0||d==0?c:gcd(c%d,d);}
int lcm(int a,int b){return a==0||b==0?0:a*b/gcd(a,b);}

int main()
{
  vector<int> a(101,0);
  int x, tmp = 0;
  while(~scanf("%d",&x)) a[x]++;
  vector<int> ans;
  FOR(i,1,100)
  {
    if(a[i] > a[tmp])
    {
      tmp = i;
      ans.clear();
      ans.push_back(tmp);
    }
    else if(a[i] == a[tmp])
      ans.push_back(i);
  }
  for(auto v : ans) printf("%d\n",v);
  return 0;
}

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

using namespace std;

int main() {
    int modecnt = 0;
    map<int, int> m;
    int n;
    while(cin >> n) 
        modecnt = max(modecnt, ++m[n]);

    vector<int> ans;
    for(map<int,int>::iterator it = m.begin(); it != m.end(); ++it)
        if(it->second == modecnt) ans.push_back(it->first);
    sort(ans.begin(), ans.end());
    for(int i = 0; i < ans.size(); ++i)
        cout << ans[i] << endl;

    return 0;
}

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

C++: #include <iostream>

using namespace std;

int main()
{
	int N, A[101], i = 0, max = 0;

	for (int i = 0; i < 100; i++) { A[i] = 0; }

	while (cin >> N)
	{
		i++;

		A[N]++;
	}

	for (int j = 1; j <= 100; j++)
	{
		if (A[j] > max) { max = A[j]; }
	}

	for (int j = 1; j <= 100; j++)
	{
		if (A[j] == max) { cout << j << endl; }
	}

	return 0;
}