-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path39.py
More file actions
22 lines (20 loc) · 644 Bytes
/
Copy path39.py
File metadata and controls
22 lines (20 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
list = []
top = 0
for p in range(0,1001):
n = 0
import math
criticalRange = math.ceil(p/3)
for a in range(1,criticalRange):
for b in range(a,p):
c = p - a - b
if c < b :
break
else:
value = math.sqrt(a*a + b*b)
#print(value)
if (value == c):
n = n + 1
if n > top:
top = n
list.append(p)
print(list[len(list)-1])