33 lines
618 B
Python
33 lines
618 B
Python
|
|
||
|
|
||
|
def euler_091():
|
||
|
n = 2
|
||
|
qs = [(x, y)
|
||
|
for x in range(n + 1)
|
||
|
for y in range(n + 1)]
|
||
|
|
||
|
def count_possible_right_triangles(q):
|
||
|
o = (0, 0)
|
||
|
if o == q:
|
||
|
return 0
|
||
|
|
||
|
ps = [(x, y)
|
||
|
for x in range(n + 1)
|
||
|
for y in range(q[0], n + 1)]
|
||
|
for p in ps:
|
||
|
if q == p:
|
||
|
continue
|
||
|
print(o, q, p)
|
||
|
|
||
|
return 0
|
||
|
|
||
|
s = sum(map(count_possible_right_triangles, qs))
|
||
|
return s
|
||
|
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
solution = euler_091()
|
||
|
print("e091.py: " + str(solution))
|
||
|
assert(solution == 0)
|