Shiyan12

Задание 27 (№ 13503 с Решу ЕГЭ)

Dec 19th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. #coding: utf-8
  2.  
  3. a = [0] * 10
  4.  
  5. n = int(input())
  6. for i in range(n):
  7.     x = int(input())
  8.     while x > 0:
  9.         a[x % 10] += 1
  10.         x //= 10
  11.  
  12. mx = -1
  13. for i in range(n):
  14.     if a[i] > mx:
  15.         mx = a[i]
  16.  
  17. j = 9
  18. for i in range(1, n + 1):
  19.     if a[-i] == mx:
  20.         print(j)
  21.     j -= 1
Add Comment
Please, Sign In to add comment