Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var max int

	numbers := map[int]int{}
	for {
		var a int
		_, err := fmt.Scan(&a)
		if err != nil {
			break
		}
		numbers[a]++
		if numbers[a] >= max {
			max = numbers[a]
		}
	}

	var modes []int
	for a, b := range numbers {
		if b == max {
			modes = append(modes, a)
		}
	}

	sort.Ints(modes)
	for _, mode := range modes {
		fmt.Println(mode)
	}
}

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

using namespace std;

int main(){
    vector<int>Times(101,0);
    int x;
    while(cin >> x){
      cin>>x;
      Times[x]+=1;
    }
    
    int ma =-1;
    for(int x=1; x<=100; x++){
        if(ma<Times[x]) ma=Times[x];
    }
     
    for(int x=1; x<=100; x++){
        if(Times[x] == ma) cout << x << endl;
    } 
    return 0;
}

C++: #include <iostream>

#define SIZE 100

using namespace std;

int main() {
	int value[SIZE] = {0}, n, max = 0;


	while (cin >> n) {
		value[n - 1]++;

		if (value[n - 1] > max) max = value[n - 1];
	}

	for (int i = 1; i <= SIZE; i++) {
		if (value[i - 1] == max) {
			cout << i << endl;
		}
	}

	return 0;
}

C++: #include <iostream>

int main(){
	int a,c=0,t=0;
	int b[100],f[100],z[100];
	z[0]=0;
	
	while(std::cin>>a){
         c++;
	    b[c]=a;
	}
	for(int g=1;g<=100;g++){
		f[g]=0;
		z[g]=0;
	}
	for(int d=1;d<=c;d++){
			f[b[d]]++;
			}
			
	for(int g=1;g<100;g++){
		
			if(f[g]>z[0]){
			
			z[0]=g;
				t=0;
			}else if(f[g]==z[0]){
				t++;
				z[t]=g;
		}
	}
	
	for(int p=0;p<t;p++){
		std::cout<<z[p]<<std::endl;
	}
	return 0;
		}

C++: #include <stdio.h>

int main(void)
{
	int i, j = 0;
	int num[10];
	int n[100];
	int max;
	
	for (i = 0; i < 10; i++){
		num[i] = 0;
	}
	
	i = 0;
	
	while ( scanf("%d", &n[i]) != EOF){
		
		switch (n[i]){
			case 0:
			num[0]++;
			break;
			
			case 1:
			num[1]++;
			break;
			
			case 2:
			num[2]++;
			break;
			
			case 3:
			num[3]++;
			break;
			
			case 4:
			num[4]++;
			break;
			
			case 5:
			num[5]++;
			break;
			
			case 6:
			num[6]++;
			break;
			
			case 7:
			num[7]++;
			break;
			
			case 8:
			num[8]++;
			break;
			
			case 9:
			num[9]++;
			break;
		}
		i++;
	}
	
	max = num[0];
	
	for (i = 1; i < 10; i++){
		if (max < num[i]){
			max = num[i];
		}
	}
	for (j = 0; j < 10; j++){
		if (max == num[j]){
			printf("%d\n", j);
		}
	}
	
	return (0);
}

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

int main(){
  int n;
  int value[101]={},a=0;

  while(cin>>n){
    value[n]++;
  }

  for(int i=0;i<101;i++){
    if(value[i]>a){
      a=value[i];
    }
  }

  for(int i=0;i<101;i++){
    if(value[i]==a){
      cout << i << endl;
    }
  }

}

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

int main() {
	int a[101] = {},i = 1,max = 0,tmp;

	while (cin >> tmp) {
		a[tmp]++;
		i++;
	}

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

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<int> cnt(110,0);
    vector<int> ans;
    int n; 
    while(cin>>n){
        cnt[n]++;
    }
    int y=0;
    for(int i=1; i<=100; i++){
        y=max(y,cnt[i]); 
    }
    for(int i=1; i<=100; i++){
        if(cnt[i]==y) ans.emplace_back(i);
    }
    for(auto& a: ans){
        cout<<a<<endl;
    }

    return 0;
}

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

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	vector<vector<int> > a(100, vector<int>(2, 0));
	for(int i=0;i<100;i++){
		a[i][0] = i;
	}
	int n;
	while(cin>>n){
		a[n][1]++;
	}
	for(int i=0;i<100-1;i++){
		for(int j=i;j<100;j++){
			if(a[i][1] < a[j][1]){
				swap(a[i][0],a[j][0]);
				swap(a[i][1],a[j][1]);
			}
		}
	}
	int hoge=0;
	while(1){
		cout<< a[hoge][0]<< endl;
		if(a[hoge][1]!=a[hoge+1][1] || hoge==99) break;
		hoge++;
	}
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

C++: #include <stdio.h> // C++???????????????
#include <string.h> // c++???????????????
#include <math.h> // c++???????????????
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
using namespace std;

typedef long long int lli;
#define PI 3.1415926535897932
#define N 100
#define MAX(a,b) ((a>b)?(a):(b)) // ?????§????????????
#define MIN(a,b) ((a<b)?(a):(b)) // ????°?????????????
#define INRANGE(a,b,c) ((a<=b&&b<=c)?(1):(0)) // a<=b<=c??????????????????????????????


void swap(int &a, int &b) { // c??????*
	int w = a;
	a = b;
	b = w;
}

int getdigit(int num) { // ??´??°????????°?????????
	int i, j;
	if (num<0) num *= -1; // ?????°???????????¢
	if (num == 0)return 1;
	for (i = 10, j = 1;; i *= 10, j++) {
		if (INRANGE(i / 10, num, i - 1))return j;
	}
	return 0; // ????????¨??????
}

int getN(int num, int digit) {
	int i = 1, j;
	for (j = 1; j<digit; i *= 10, j++);
	return (num / i) % 10;
}

int zeller(int y, int m, int d) { // 0????????\????????§??????
	if (m<3) { y--; m += 12; }
	return (y + y / 4 - y / 100 + y / 400 + (13 * m + 8) / 5 + d) % 7;
}

int gcd(int a, int b) {	// ?????§??¬?´???°
	if (b == 0) return a;
	return gcd(b, a%b);
}

int lcm(int a, int b) {	// ????°???¬?????°
	return a*b / gcd(a, b);
}

int stoi(const string str) { // ?????????????????´??°
	int i = 0, j;
	int len = str.length();
	int w = 0;
	for (i = 1, j = 1; i <= len && INRANGE('0', str[len - i], '9'); i++, j *= 10) {
		w += (str[len - i] - '0')*j;
	}
	if (str[0] == '-')w *= -1;
	return w;
}

string itos(int a) { // ??´??°???????????????
	int i;
	string str = "";
	int keta;
	if (a<0) { str += '-'; a *= -1; } // ?????°??????????????????
	for (keta = 10; a / keta != 0; keta *= 10);
	for (i = keta / 10; i != 0; i /= 10) {
		str += ((a / i) % 10) + '0';
	}
	return str;
}

int main(void) {
	int max;
	map<int, int> m;
	map<int,int>::iterator it;
	int a;
	int n = 3;
	while (cin >> a,n--) {
		m[a]++;
	}
	max = 0;
	for (it = m.begin(); it != m.end(); it++) {
		max = MAX(max, it->second);
	}
	for (it = m.begin(); it != m.end(); it++) {
		if (max == it->second) cout << it->first<<endl;
	}
	return 0;
}

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

int n, cnt[101];
vector<pair<int, int>> ans;

int main() {
  cin.tie(0); ios_base::sync_with_stdio(false);
  while(cin >> n) ++cnt[n];
  for(int i = 1; i <= 100; ++i) if(cnt[i]) ans.emplace_back(cnt[i], -i);
  sort(ans.rbegin(), ans.rend());

  for(int i = 0; ans[i].first == ans[0].first; ++i) cout << -ans[i].second << '\n';
  return 0;
}

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

int main()
{
	int count[101] = {0},value,max;

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