HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Forums > Discussion of problems > topic:


Problem "Variant 15"

ENM-Mirbek.MahmatovOct.27.2024 at 02:21:58 PM
0a, b = map(int, input().split())
count = 0

for num in range(a, b + 1):
digits = list(map(int, str(num)))
n = len(digits)
if sum(digit ** n for digit in digits) == num:
count += 1

print(count)


www.contester.ru