Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #coding: utf-8
- a = [0] * 10
- n = int(input())
- for i in range(n):
- x = int(input())
- while x > 0:
- a[x % 10] += 1
- x //= 10
- mx = -1
- for i in range(n):
- if a[i] > mx:
- mx = a[i]
- j = 9
- for i in range(1, n + 1):
- if a[-i] == mx:
- print(j)
- j -= 1
Add Comment
Please, Sign In to add comment