euler/python/e091.py

33 lines
618 B
Python
Raw Normal View History

2021-04-19 17:55:37 +02:00
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)