универсал
lst = [] n = 7**103 + 6*7**104 - 3*7**57 + 98 base = 7 while n > 0: lst.append(n % base) n = n // base print(lst.count(6))
Примеры