Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cnt = 0
- for i in range(1000):
- n = 1
- s = i
- while s > n:
- s -= 15
- n *= 5
- if n == 125:
- cnt += 1
- print(cnt)
- # x > 1
- # x - 15 > 5
- #x - 15 - 15 > 25
- #x - 15 - 15 - 15 <= 125
- #min x == 25 + 1 + 15 + 15 == 56
- #max x == 125 + 15*3 == 170
- #cnt == 170 - 56 + 1 == 115
Advertisement
Add Comment
Please, Sign In to add comment