#pe039
max = -1
for p in range(7,1001):
sols = 0
for a in range(p//3,0,-1):
b = (p*p - 2*a*p)//(2*p - 2*a)
c = p-a-b
if c*c == (a*a + b*b) and amax:
max = sols
max_at = p
print(max_at)
Project Euler Problem 39
Go here for question
#pe039
max = -1
for p in range(7,1001):
sols = 0
for a in range(p//3,0,-1):
b = (p*p - 2*a*p)//(2*p - 2*a)
c = p-a-b
if c*c == (a*a + b*b) and amax:
max = sols
max_at = p
print(max_at)