Run ID:155052

提交时间:2026-05-31 12:49:50

#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int b[1001] = {0}; for (int i = 1; i <= n; i++) { int x; cin >> x; b[x] = b[x] + 1; } int m = 1; for (int i = 2; i <= 1000; i++) { if (b[i] > b[m]) { m = i; } } cout<<m; return 0; }