Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_truth(mangoes):
- for _ in range(5):
- if mangoes % 5 != 1:
- return False
- mangoes = ((mangoes - 1) // 5) * 4
- return not mangoes % 5
- def count():
- counter = 1
- while True:
- yield counter
- counter += 1
- for i in count():
- if get_truth(i):
- print(i)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement