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 <bits/stdc++.h>
using namespace std;
typedef long long ll;

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

C++: #include<stdio.h> 
short f[100];short ans=0;short n;int main(){while(scanf("%d",&n)!=EOF){f[n-1]++;if(f[ans]<f[n-1])ans=n-1;}for(n=0;n<100;n++)if(f[n]==f[ans])printf("%d\n",n+1);}

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

int main()
{
  int cnt[101] = {0};
  int data, ma = 0;
  priority_queue<int, vector<int>, greater<int> > q;
  while( cin >> data ) {
    cnt[data]++;
    ma = max(ma, cnt[data]);
  }

  for(int i=1; i<=100; i++) {
    if( cnt[i] == ma ) {
      q.push( i );
    }
  }

  while( !q.empty() ) {
    cout << q.top() << endl;
    q.pop();
  }
}

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

using namespace std;

int main(void){

  int p[14][14] = {0};
  int x,y,size;
  char ten,tenten;
 back:;
  while( cin >> x >> ten >> y >> tenten >> size ){
    x++;x++;
    y++;y++;
    switch(size){
    case 3:
      p[x-2][y]++;
      p[x+2][y]++;
      p[x][y-2]++;
      p[x][y+2]++;
    case 2:
      p[x+1][y+1]++;
      p[x-1][y-1]++;
      p[x+1][y-1]++;
      p[x-1][y+1]++;
    case 1:
      p[x][y+1]++;
      p[x][y-1]++;
      p[x-1][y]++;
      p[x+1][y]++;
      p[x][y]++;
    }
  }
  
  int cnt = 0;
  int m = 0;
  for( int i = 2 ; i < 12 ; i++ ){
    for( int j = 2 ; j < 12 ; j++ ){
      if( p[i][j] == 0 ) cnt++;
      m = max( m , p[i][j] );
    }
  }
  cout << cnt << endl << m << endl;
  return 0;
}

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

int main(){
  int n;
  complex<int> c;
  vector< complex<int> > v;
  vector<int> srt;

  while( cin>>n ){
    if( v.size()==0 ){
      c.real() = n;
      c.imag() = 1;
      v.push_back( c );
      //      cout << "push_back : "<< n << endl;
    }else{
      for( unsigned int i=0;i<v.size();i++ ){
	if( v[i].real()==n ){
	  //	  cout << "coindance : "<<n << endl;
	  v[i].imag()++;
	  break;
	}
	if( i==v.size()-1 ){
	  c.real() = n; c.imag()=1;
	  v.push_back( c );
	  //	  cout << "push_back : "<< n << endl;
	  break;
	}
      }
    }
  }

  int mx = -1;
  for( unsigned int i=0;i<v.size();i++ ){
    //    cout << v[i].real()<<" "<<v[i].imag() << endl;
    mx = max( v[i].imag(), mx );
  }

  srt.clear();
  for( unsigned int i=0;i<v.size();i++ ){
    if( v[i].imag()==mx )
      srt.push_back( v[i].real() );
  }

  sort( srt.begin(), srt.end() );
  for( unsigned int i=0;i<srt.size();i++ )
    cout << srt[i] << endl;

  return 0;
}

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


//0028
int main(){
	int x,max_freq=0;
	int digit[101]={0};
	

	while(cin >> x ){
		
		max_freq = max(max_freq, ++digit[x]);
		
	}
		for(int i=0; i<101; ++i){
			if(digit[i]==max_freq){
				cout << i << endl;
			}
		}


}

C++: #include <iostream>
#include <utility>
#include <vector>
#include <algorithm>
using namespace std;
typedef pair<int,int> P;

bool comp(const P& a, const P& b) {
	if (a.first != b.first) return (a.first > b.first);
	return (a.second < b.second);
}

int main() {
	vector<P> seq;
	int n;
	while (cin >> n) {
		bool inserted = false;
		for (int i = 0; i < seq.size(); i++) {
			if (seq[i].second == n) {
				seq[i].first++;
				inserted = true;
			}
		}
		if (!inserted)
			seq.push_back(P(1, n));
	}

	sort(seq.begin(), seq.end(), comp);

	int m = seq[0].first;
	for (int i = 0; seq[i].first == m; i++)
		cout << seq[i].second << endl;
	
	return 0;
}

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

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

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

int main(){
	int n[101], k, max=0;
	string ans;

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

	while(true){
		cin >> k;
		if (cin.eof()) { break; }
		n[k]++;
	}
	for(int i = 0;i<101;i++){
		if(max == n[i]){
			ans += "\n";
			ans += to_string(i);
		}
		else if (max < n[i]){
			ans = to_string(i);
			max = n[i];
		}
	}
	cout << ans << endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
	int N[101] = {};
	vector<int> vM;
	vM.reserve(100);
	int c = 0, k;
	while(cin >> k){
		++N[k];
		if(N[k] > c){
			c = N[k];
			vM.clear();
			vM.push_back(k);
		} else if( N[k] == c)
			vM.push_back(k);
	}
	sort(vM.begin(), vM.end());
	for(int i = 0; i < vM.size(); ++i)
		cout << vM[i] << "\n";
	return 0;
}

C++: #include <stdio.h>

int main()
{
	int i;
	int seed,max = 0;
	int data[100] = { 0 };
	int maxnum[100];
	while ((scanf_s("%d", &seed)) != EOF)
	{
		data[seed-1] += 1;
	}
	for (i = 0; i < 100; i++)
	{
		if (data[i] > max) max = data[i];
	}
	for (i = 0; i < 100; i++)
	{
		if (data[i] == max) printf("%d\n", i + 1);
	}
	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;
    rep(i, 100) {
        a[i] = 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 <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

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

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back


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

    while(cin>>n){
        if(n==0)break;
        times[n]++;
    }
    int maxi=-1;
    rep(i,100+1){
        maxi=max(maxi,times[i]);
    }
    rep(i,100+1){
        if(times[i]==maxi){
            cout<<i<<endl;
        }
    }

    return 0;
}

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

C++: #include<iostream>

using namespace std;

int list[101];

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

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

using namespace std;

const int N = 100;

int main(void){
    int in[N] = { 0 };
    for(int n; cin >> n; in[n - 1] ++);

    for(int *p = max_element(in, in + N), result = *p; *(p = max_element(in, in + N)) == result; cout << int(p + 1 - in) << endl) *p = -1;
    
    return 0;
}