bounslay

Untitled

May 12th, 2023
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. n = int(input())
  2.  
  3. lst = [int(input()) for i in range(n)]
  4.  
  5.  
  6. my_dict = {}
  7. for i in lst:
  8.     my_dict[i] = my_dict.get(i, 0) + 1
  9.  
  10.  
  11. max_key =  max(my_dict, key=my_dict.get)
  12. print(max_key)
Advertisement
Add Comment
Please, Sign In to add comment