Untitled
unknown
plain_text
3 years ago
515 B
18
Indexable
import math, sys
c = 0
triplet = []
total = 1
for i in range(1,1000):
for j in range(1,1000):
c = i**2 + j**2
c = math.sqrt(c)
if c % 1 == 0:
triplet.append(i)
triplet.append(j)
triplet.append(int(c))
if i + j + c == 1000:
print(triplet)
for n in range(3):
total *= triplet[n]
print(total)
sys.exit()
triplet = []
Editor is loading...