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 <vector>
#include <algorithm>
using namespace std;
 
int main(){
   int n, m = 0;
   int a[101];
   vector<int> ans;
 
   for(int i=1 ; i <= 100 ; i++){
       a[i] = 0;
   }
   while( cin >> n ){
       a[n]++;
   }
   for(int i=1 ; i <= 100 ; i++){
       m = max( a[i] , m );
   }
   for(int i=1 ; i <= 100 ; i++){
       if( m == a[i] ) ans.push_back(i);
   }
   sort( ans.begin() , ans.end() );
   for(int i=0 ; i < ans.size() ; i++ ){
       cout << ans[i] << endl;
   }
}

C++: #include <stdio.h>
#include <algorithm>

using namespace std;

char data[1000000];

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

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
//#include <sstream>
//#include <queue>

using namespace std;


int main(){

	int n;
	int cnt[100];
	int mead = 0;

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

	while (cin >> n){
		cnt[n - 1]++;
		if (cnt[n - 1] > mead) mead = cnt[n - 1];
	}

	for (int i = 0; i < 100; i++){
		if (cnt[i] == mead) cout << i + 1 << endl;
	}

	return 0;
}

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

C++: #include <bits/stdc++.h>
#include <stdio.h>
#include <numeric>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define pb(a) push_back(a)
#define pbpair(a,b) push_back(make_pair(a,b))
#define MOD 1000000007
#define INF 9223372036854775807
#define pairint pair<int,int>
typedef pair< int , int> P;
int gcd( int x, int y ){
   return y ? gcd(y, x%y) : x;
 }
bool pairCompare(const P& firstElof, const P& secondElof)
{
  if(firstElof.second!= secondElof.second)    return firstElof.second> secondElof.second;
  else return firstElof.first< secondElof.first;
}
signed main() {
int x=0,y=0,z=0,w=0,n=0,m=0;
std::vector< pairint > v(101);
string k;
while(std::cin >> x){
v[x].first=x;
v[x].second++;
}
sort(all(v),pairCompare);
std::cout << v[0].first << '\n';
repone(i,101){
  if(v[0].second==v[i].second){
    std::cout << v[i].first << '\n';
  }else {
    return 0;
  }
}
}

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

int main() {
    int x[1000] = {};
    int a;
    while(cin >> a) {
        x[a]++;
    }

    int mx = -1, mx_count = 0;
    for (int i = 0; i < 101; i++) {
        if (mx_count < x[i]) {
            mx = i;
            mx_count = x[i];
        }
    }
    for (int i = 0; i < 101; i++) {
        if (mx_count == x[i])
            cout << i << endl;
    }
}

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[i]-1][0]++;
	i++;
}
for(int j=0;j<i;j++)
{
	for(int k=i-1;k>=j+1;k--)
	{
		if(b[k][0]>b[j][0])
		{
			B1=b[k][0];
			b[k][0]=b[j][0];
			b[j][0]=B1;
			B2=b[k][1];
			b[k][1]=b[j][1];
			b[j][1]=B2;
		}
	}
}
int l=0;
while(b[l][0]==b[0][0])
{
	cout<<b[l][1]<<endl;
	l++;
}
return 0;
}

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

using namespace std;
#define LENGTH 100

int main(){
  
  vector<int> Digit(LENGTH, 0);
  
  
  int tmp;
  int cnt=0;
  while(cin >> tmp){
    cnt++;
    Digit[tmp]++;
  }
  int max = 0;
  vector<int> maxDigits;
  for(int i=0;i<cnt;i++){
    if(Digit[i]>max){
      //      vector<int>().swap(maxDigits); //
      maxDigits.clear();
      maxDigits.push_back(i);
      max = Digit[i];
      //      cout << i << ">:" << endl; 
    }else{
      if(Digit[i]==max){
	maxDigits.push_back(i);
	//	cout << i << "==:" << endl;
      }
    }
  }

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

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

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

int main()
{
	map<int, int> d;
	int n;

	while (cin >> n)
	{
		if (d.find(n) == d.end())
			d[n] = 1;
		else
			d[n]++;
	}

	map<int, int>::iterator it;
	int Max = 0;
	for (it=d.begin(); it!=d.end(); it++)
		if (Max < it->second)
			Max = it->second;

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

C++: #include<iostream>

using namespace std;

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

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

#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rep(i, n) REP (i, 0, n)
#define mset(a, n) memset(a, n, sizeof(a))

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pair<int, int> > vpii;

int main() {
	int data[100];
	rep (i, 100) data[i] = 0;
	int num, cnt = 0;
	while (cin >> num) {
		data[num]++;
	}
	rep(i, 100) {
		cnt = max(cnt, data[i]);
	}
	rep(i, 100) {
		if (data[i] == cnt) {
			cout << i << endl;
		}
	}
}

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

int main()
{
  int num[101] = {0};
  int n;

  while (~scanf("%d", &n)){
    num[n]++;
  }
  
  int n_max = 0;
  for (int i = 1; i <= 100; i++){
    n_max = max(n_max, num[i]);
  }

  for (int i = 1; i <= 100; i++){
    if (num[i] == n_max){
      printf("%d\n", i);
    }
  }

  return (0);
}

C++: #include <iostream>

using namespace std;

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