Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n, k = map(int, input().split())
- tokens = input().split()
- store = []
- for i in range(k):
- store.append(0)
- for num in tokens:
- store[int(num)-1] += 1
- for i in range(len(store)):
- if store[i] == max(store):
- print(i+1)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement