Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #14 https://kpolyakov.spb.ru/school/ege/gen.php?action=viewVar&answers=on&varId=2
- n = 5 ** 8
- answ = (0, 0) #кол-во четверок, x
- for x in range(10, 70001):
- r = n - x
- cnt = 0
- while r != 0:
- if r % 5 == 4:
- cnt += 1
- r //= 5
- answ = max(answ, (cnt, x))
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement