CCF 201312-1 出现次数最多的数(python)
找到个出现最多的,并且在出现最多中最小
n = int(input())
List1 = list(map(int, input().split()))
List2 = [0]*10000
maxNum = 0
for i in List1:
List2[i] += 1
if List2[maxNum] < List2[i]:
maxNum = i
elif List2[maxNum] == List2[i] and maxNum > i:
maxNum = i
print(maxNum)