#include <iostream>
using namespace std;
int main() {
int m, n, x, count = 1;
int k, temp, maxcount = 0;
cin >> n;
int a[1000] = {0};
int b[101] = {0};
for (int i = 0; i < n; i++) {
cin >> x;
a[i] = x;
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (a[i] == a[j] && i != j) {
b[a[i]]++;
}
}
if (maxcount <= b[a[i]]) {
maxcount = b[a[i]];
}
}
for (int i = 0; i < n; i++) {
if (b[i] == maxcount) {
cout << i;
}
}
return 0;
}
版权声明:本文为RicardoLJX原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。