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>
using namespace std;
int main(){
	int a[101]={},b;
	while(cin>>b){
		a[b]++;
	}
	b=0;
	for(int i=1;i<=100;i++){
		if(b<a[i])b=a[i];
	}
	for(int j=1;j<=100;j++){
		if(b==a[j])cout<<j<<endl;
	}
    return 0;
    }

C++: #include <iostream>

using namespace std;

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

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

int main(){
  int i,a[N];
  while(cin >> i) a[i-1]++;
  int max = a[0];
  for(int j = 0; j < N; j++){
    if(max < a[j]) max = a[j];
  }
  for(int k = 0; k < N; k++){
    if(a[k] == max) cout << k + 1 << "\n";
  }
}

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

C++: #include <stdio.h>

int main(void)
{
	int a[101];
	int n;
	int i;

	for (i = 0; i < 101; i++){
		a[i] = 0;
	}

	while (scanf("%d", &n) != EOF){
		a[n]++;

		if (a[0] < a[n]){
			a[0] = a[n];
		}
	}

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

	return (0);
}

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

int main(){
  int i,a[100];
  while(cin >> i) a[i-1]++;
  int m = max(a[100]);
  while(int j = 0; j <100; j++){
    if(a[j] == m) cout << j + 1 << "\n";
  }
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
	int max=0,count=0;
	std::vector<int> vec(100);
	std::vector<int> vec2(100);
	std::vector<int> vec3;
	while(1){
		for(int i=0;i<100;i++){
			std::cin>>vec[i];
			//if(vec[i]==0)break;
			vec2[vec[i]]++;
			if(vec2[vec[i]]>max)max=vec2[vec[i]];
			count++;
		}
		if(std::cin.eof())break;
	}
	for(int i=0;i<count;i++){
		if(vec2[vec[i]]==max){
			vec3.push_back(vec[i]);
			vec2[vec[i]]=0;
		}
	}
	sort(vec3.begin(),vec3.end());
	for(int i=0;i<vec3.size();i++)std::cout<<vec3[i]<<std::endl;
	return 0;
}

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

int main(){
	int n;
	vector<pair<int,int> > rank(101);
	for(int i=0; i<101; i++ ) rank[i] = make_pair(0,i);
	while( cin >> n ){
		rank[n].first++;
	}
	sort(rank.begin(), rank.end(),greater<pair<int,int> >());
	vector<int> ans;
	ans.push_back(rank[0].second); 
	for(int i=1; rank[i-1].second>rank[i].second; i++) ans.push_back(rank[i].second);
	sort(ans.begin(), ans.end());
	for(int i=0; i<ans.size(); i++ ) cout << ans[i] << endl;
}

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

int main()
{
	int a[101] = { 0 };
	int k;
	int mex = 0;
	while (cin >> k) {
		a[k]++;
		if (mex < a[k]) {
			mex = a[k];
			//cout << "mex??´??°" << k << endl;
		}
	}
	for (int i = 1; i <= 100; i++) {
		if (a[i] == mex) {
			cout << i << endl;
		}
	}
    return 0;
}

C++: // 2011/07/01 Tazoe

#include <iostream>
using namespace std;

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

	while(true){
		int num;
		cin >> num;
		if(cin.eof())
			break;

		cnt[num]++;
	}

	int max = 0;
	for(int i=1; i<=100; i++)
		if(cnt[i]>max)
			max = cnt[i];

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

	return 0;
}

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

C++: #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
	int a[100] = { 0 };
	int n;
	while (cin >> n)
		a[n - 1]++;

	int ma = 0;
	REP(i, 100){
		ma = max(ma, a[i]);
	}
	REP(i, 100){
		if (a[i] == ma)
			cout << (i + 1) << endl;
	}
	return 0;
}

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

using namespace std;
int main(){
	int a[101]={0},n=0,saidai[100]={0},m=0;
	while(cin>>n){
		a[n]++;
	}
	for(int i=1;i<101;i++){
		if(saidai[m]<a[i]){
			for(int x=0;x<=m;x++){
				saidai[x]=0;
				m=0;
			}
			saidai[m]=i;
		}
		else if(saidai[m]==a[i]){
			saidai[m+1]=saidai[m];
			saidai[m]=i;
			m++;
		}
	}
	sort(saidai,saidai+100);
	for(int i=0;i<=100;i++){
		if(saidai[i]!=0){
			cout<<saidai[i]<<endl;
		}
	}
	return 0;
}

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

int main() {
  int r[100];
  for (int i=0; i<100; i++) r[i] = 0;
  int n;
  while (cin >> n) {r[n-1]++; if(n==0)break;}
  int maxValue = -1;
  for (int i=0; i<100; i++) if (r[i] > maxValue) maxValue = r[i];
  for (int i=0; i<100; i++) if (r[i] == maxValue) cout << i+1 << endl;
  return 0;
}

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

int main()
{
	int val;
	int cnt[101] = {};
	while (cin >> val) {
		cnt[val]++;
	}
	vector<int> v;
	int ma = 0;
	for (int i = 1; i <= 100; i++) {
		if (cnt[i] > ma) {
			ma = cnt[i];
			v.clear();
			v.push_back(i);
		}
		else if (cnt[i] == ma) {
			v.push_back(i);
		}
	}
	for (auto va : v) {
		cout << va << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<cstdio>
using namespace std;
int main()
{
  int n;
  int count[100] = { 0 };
  int ans[100] = { 0 };
  int bigcnt = 0;

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

  for(int i = 0;i < 100;i++){
    if(bigcnt < count[i]){
      bigcnt = count[i];
    }
  }
  
  int j = 0;

  for(int i = 0;i < 100;i++){
    if(bigcnt == count[i]){
      ans[j] = i+1;
      j++;
    }
  }
  
  for(int i = 0;i < j;i++){
    cout << ans[i] << endl;
  }
  
}

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

using namespace std;

int main()
{
  int val;
  int count[101];

  fill(count, count+101, 0);

  while(cin>>val){
    ++count[val];
  }

  val = 0;
  for(int i = 1; i < 101; ++i)
    val = max(val, count[i]);

  for(int i = 1; i < 101; ++i)
    if(count[i] == val)
      cout << i << endl;

  return 0;
}

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

using namespace std;

int a[101];

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