1 solutions

  • 1
    @ 2025-11-6 16:52:15
    #include<iostream>
    using namespace std;
    int main(){
    	int n;
    	cin>>n;
    	int c[1001]={0};
    	for(int i=0;i<n;++i){
    		int num;
    		cin>>num;
    		c[num]++;
    	}
    	int max=0,m=0;
    	for(int i=0;i<=1000;++i)
    		if(c[i]>max)
    			max=c[i],m=i;
    	cout<<m<<endl;
    	return 0;
    }
    

    长度非常吉利 250 bytes

    • 1

    Information

    ID
    278
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    10
    Tags
    # Submissions
    6
    Accepted
    4
    Uploaded By