Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 061e659cfb
Fetching contributors…

Cannot retrieve contributors at this time

12 lines (10 sloc) 0.321 kb
max_a = 332
max_b = 499
max_c = 997
for a in range(1, max_a+1):
for b in range(1, max_b+1):
c = 1000 - a - b
if c > b:
if (a**2 + b**2)==c**2:
print '%d + %d = %d' % (a, b, c) # prints 200 + 375 = 425
print 'Product: %d' % (a*b*c) # prints 31875000
Jump to Line
Something went wrong with that request. Please try again.