Run ID:146279

提交时间:2026-01-27 19:40:30

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int a[1001] = {0}; int main() { int x, n, b; int max = -1; cin >> n; for (int i = 1; i <= n; i++) { cin >> x; a[x]++; } for (int i = 1; i <= 1000; i++) { if (a[i] > max) { max = a[i]; b = i; } } cout << b; return 0; }