Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python3
- def solve():
- x = 0
- while True:
- for y in range((x - 5) + 1):
- for z in range((round(x / 2)) + 1):
- if x + y + z == 60 and x - y == 5 and x / 2 == z:
- yield x, y, z
- x += 1
- answer = next(solve())
- print(answer)
- # (26, 21, 13)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement