Advertisement
AlimusSifar

Aloyna and Can Buying - Toph.co - Implementation

Apr 30th, 2020
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. n, k = map(int, input().split())
  2. tokens = input().split()
  3.  
  4. store = []
  5. for i in range(k):
  6.     store.append(0)
  7.  
  8. for num in tokens:
  9.     store[int(num)-1] += 1
  10.  
  11. for i in range(len(store)):
  12.     if store[i] == max(store):
  13.         print(i+1)
  14.         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement