Run ID:122923

提交时间:2025-06-22 09:44:46

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