Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for s in range(1, 23, 2):
- for t in range(1, 23, 2):
- for d in range(1, min(s, t) + 1):
- if s % d == 0 and t % d == 0:
- continue # whoops, common factor!
- c = int((s**2 + t**2)/2)
- b = int((s**2 - t**2)/2)
- a = int(s*t)
- if a > 0 and b > 0 and c > 0:
- print(a, b, c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement