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 <cstdio>
#include <algorithm>
#include <vector>
using namespace std;

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

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

map<int, int> freqmap;
vector<int> most_freqs;

int main() {
    int n;
    while (cin >> n) {
        freqmap[n]++;
    }

    int freq = 0;
    for (map<int, int>::iterator i = freqmap.begin(); i != freqmap.end(); i++) {
        freq = freq > (*i).second ? freq : (*i).second;
    }

    for (map<int, int>::iterator i = freqmap.begin(); i != freqmap.end(); i++) {
        if ( (*i).second == freq ) {
            most_freqs.push_back( (*i).first );
        }
    }

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

    for (vector<int>::iterator i = most_freqs.begin(); i != most_freqs.end(); i++) {
        cout << (*i) << endl;
    }

    return 0;
}

C++: #include <iostream>

using namespace std;

void Solution()
{
    // notice the typing !!
    int n;
    
    int times = 0; // save the data in here about most frequently times
    
    int a[101] = {0};// the array which saves the mode value, at the beginning is all "0"
    
    while(cin>>n)
    {
        a[n]++; //after input some value, array's value can be added by 1 (0 -> 1), repeat this part.
    }
    
    
    for(int i = 0; i < 101; i++) // the data is less than 100
    {
        if(a[i] > times) //check the  a[] value for ensuring the mode value
        {
            times = a[i]; //repeat this part, at the last, can find mode value
        }
    }
    
    for(int i = 0; i < 101; i++) //output mode value
    {
        if(a[i] == times)
        {
            cout<<i<<endl;
        }
    }
    
    return;
}

int main()
{
    Solution();
    return 0;
}

C++: int main()
{
	int i;
	int seed,max = 0;
	int data[100] = { 0 };
	int maxnum[100];
	while ((scanf("%d", &seed)) != EOF)
	{
		data[seed] += 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>
using namespace std;

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

C++: #include <iostream>

using namespace std;

int main(void) {
	int n, num[101] = {0};
	int mode[100] = {0};

	while (cin >> n) {
		num[n]++;
	}
	for (int i = 1; i <= 101; i++) {
		if (num[i] != 0) {
			if (num[i] == num[mode[0]]) {
				for (int j = 0; j < 100; j++) {
					if (mode[j] == 0) {
						mode[j] = i;
						break;
					}
				}
			}
			else if (num[i] > num[mode[0]]) {
				for (int j = 0; j < 100; j++) {
					mode[j] = 0;
				}
				mode[0] = i;
			}
		}
	}
	for (int i = 0; i < 100; i++) {
		cout << mode[i] << endl;
		if (mode[i + 1] == 0) {
			break;
		}
	}
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
int main()
{
    vector<int> b(101, 0);
    int t;
    while (cin >> t) b[t]++;

    vector<pair<int, int> > v;
    for (int i = 1; i < 101; ++i) v.push_back(make_pair(-b[i], i));
    sort(v.begin(), v.end());
    for (int i = 0; i < 101; ++i) if (v[i].first == v[0].first)
        cout << v[i].second << endl;

    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

int main(){
	int t[250000]={0},m=0,n;
	while(cin>>n){
		t[n]++;
		if(t[n]>m)m=t[n];
	}
	for(int i=0;i<250000;i++){
		if(t[i]==m)cout<<i<<endl;
	}
}

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

#define MAXINUM   ( 100 + 1 )

using namespace std;

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int input[ MAXINUM ] = { 0 };
  int countMax = 0;

  while ( true )
  {
    int __tmp;
    
    if ( !( cin >> __tmp ) ) break;
    countMax = max ( countMax, ++input[ __tmp ] );
  }
  if ( countMax == 0 )  return ( 0 );

  for ( int i = 0; i < MAXINUM; ++i )
  {
    if ( input[ i ] == countMax )
    {
      cout << i << endl;
    }
  }

  return ( 0 );
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int date[1000],higher[1000],high[1000]={0},t=0,bell=0,hess=0,aizu=0,riri=0;
  while(scanf("%d",&date[t])!=EOF){
    high[date[t]]++;
    t++;
  }
  for(int i=0;i<t;i++){
    if(bell<high[i]){
      higher[0]=i;
      bell=high[i];
      riri=i;
    }
  }
  for(int i=0;i<t;i++){
    if(higher[hess]==high[i] && i!=riri){
      hess++;
      higher[hess]=i;
    }
  }
  for(int i=0;i<=hess;i++){
    cout << higher[i] << endl;
  }
  return (0);
}

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve

int main(int argc, char const* argv[])
{
  int n;
  unordered_map<int, int> mp;
  while(cin >> n){
    mp[n]++;
  }
  int maxi = -1;
  for(auto itr = mp.begin(); itr != mp.end(); ++itr){
    maxi = max(maxi, itr->second);
  }
  vector<int> vec;
  for(auto itr = mp.begin(); itr != mp.end(); ++itr){
    if(maxi == itr->second)vec.pb(itr->first);
  }
  sort(vec.begin(), vec.end());
  rep(i, vec.size()){
    cout << vec[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;
	for(int ds=0;ds<12;ds++){
	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]){a
				t++;
				z[t]=g;
		}
	}
	for(int p=0;p<t;p++){
		std::cout<<z[p]<<std::endl;
	}
	return 0;
		}

C++: #include<cstdio>
int main(){
    int a[100];
    int s,m=0;
    for(int i=0;i<100;i++){
        a[i]=0;
    }
    while(~scanf("%d",&s)){
        a[s-1]++;
        if(m<a[s-1]) m=a[s-1];
    }
    for(int i=0;i<100;i++){
        if(a[i]==m) printf("%d\n",i+1);
    }
}