Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

type Pair struct {
	key   int
	value int
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for {
		n, err := nextInt()
		if err != nil {
			break
		}

		counts[n]++
	}

	pairs := []Pair{}
	for k, v := range counts {
		pairs = append(pairs, Pair{k, v})
	}
	sort.Slice(pairs, func(i, j int) bool {
		if pairs[i].value == pairs[j].value {
			return pairs[i].key < pairs[j].key
		}
		return pairs[i].value > pairs[j].value
	})

	vMax := 0
	for _, pair := range pairs {
		if vMax != 0 && vMax != pair.value {
			break
		}
		if pair.value > vMax {
			vMax = pair.value
		}
		fmt.Println(pair.key)
	}
}

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;
    while(cin >> n){
        vec[n]++;
        int tmp = 0;
        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 <iostream>
#include <algorithm>
using namespace std;

int main(){
  int n,m;
  int a[100]={0};
  while(cin>>n) a[n-1]++;
  m = *max_element(a,a+100);
  for(int i=0;i<100;i++){
    if(m==a[i]) cout<<i+1<<endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	int n, time[100] = {0}, i, tmp = 0, max[100] = {0};
	while (cin >> n && !cin.eof())
		time[n-1]++;
	for (i = 0; i < 100; i++)
		if (time[i] > tmp)
			tmp = time[i];
	for (i = 0; i < 100; i++)
		if (time[i] == tmp)
			cout << i+1 << endl;
	return 0;
}

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

int main(){
  int n;
  map<int, int> p;
  int mx=0;
  while(cin>>n){
    mx=max(mx,++p[n]);
  }
  for(auto i:p)
    if(mx==i.second) cout<<i.first<<endl;
  return 0;
}

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

using namespace std;

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

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

C++: #include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
int main()
{
int a[100];
for(int i=0;i<100;i++)a[i]=0;
int n;
while(cin >> n){
a[n-1]++;
}
int ans=0;
for(int i=1;i<100;i++){
if(a[ans]<a[i])ans=i;
}
cout << ans+1 << "\n";
return 0;
}

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<stdio.h>
#include<iostream>
using namespace std;

int main(){
  int j,k;
  int v[200]={0};
  int a;
  int max=0;

  while((scanf("%d",&a)!=EOF)){
    v[a-1]++;
  }

  for(k=0;k<100;k++){
    if(max < v[k])
      max = v[k];
  }
  for(k=0;k<100;k++){
    if(v[k]==max)
      printf("%d\n",k+1);
  }
  return 0;
}

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

int n;
int maxcnt;
int cnt[101];

int main() {
  while (1) {
    if (scanf("%d", &n) != 1) break;
    cnt[n]++;
    maxcnt = max(maxcnt, cnt[n]);
  }

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

C++: #include<iostream>

using namespace std;

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

}

C++: #include <iostream>
#include <vector> 
#include <math.h>
#include <stdio.h>
using namespace std;

double r(double x1,double y1,double x2,double y2){
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
	
	}

int main() {
	// your code goes here
int n;
int a[110]={0};
while(cin>>n){
	a[n]=a[n]+1;

}
int ma=-1;
vector<int> ve;
for(int j=0;j<101;j++){
	if(a[j]==ma){
		ve.push_back(j);
	}
	else if(a[j]>ma){
		ve.clear();
        ve.push_back(j);
        ma=a[j];
	}
		
		
	}
	
	int y=ve.size();
	for(int u=0;u<y;u++){
		cout<<ve[u]<<endl;
		
	}
	


	
	return 0;
}

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

#define MAX 100

int main()
{
	vector<int> data(MAX);
	int a, max, i;

	max = 0;
	while (cin>>a)
		if (++data[a-1] > max) max = data[a-1];

	for (i = 0; i < MAX; i++)
		if (data[i] == max) cout<<(i+1)<<endl;

	return 0;
}

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