save progress
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
a = 1
|
||||
b = 1
|
||||
c = 1
|
||||
|
||||
def is_pythag(a, b, c):
|
||||
return a < b < c and a**2 + b**2 == c**2
|
||||
|
||||
|
||||
for a in range(1, 1000):
|
||||
for b in range(1, 1000):
|
||||
for c in range(1, 1000):
|
||||
|
||||
if c % 100 == 0:
|
||||
print(f"iter {a} {b} {c}", end="\r")
|
||||
|
||||
|
||||
|
||||
|
||||
if is_pythag(a, b, c) and a+b+c==1000:
|
||||
print(f"a {a} b {b} c {c}")
|
||||
else:
|
||||
continue
|
||||
Reference in New Issue
Block a user