#2634. 练60.2 众数
练60.2 众数
说明
对于一个长度为 $n$ 的序列 {$a_n$} 来说,其众数被定义为出现次数最多的数。现在给定一个长度为 $n$ 的序列,请帮忙求出它的众数是多少。
当然众数可能有多个,你只需要输出最小的一个就可以了。
输入格式
第一行输入 $n$,第二行输入 $n$ 个数,$n<10^6$,$0≤a_i≤1000$。输出格式
输出众数。6
3 5 7 5 3 1
3
6
3 5 7 5 3 1
3
By signing up a 津桥OJ universal account, you can submit code and join discussions in all online judging services provided by us.