Run ID:126881
提交时间:2025-07-22 13:39:54
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int b[1001] = {0}; for (int i = 0; i < n; i++) { int x ; cin >> x; b[x]++; } int max = 1; for (int i = 2; i <= 1000; i++) { if (b[i] > b[max]) { max = i; } } cout << max; return 0; }