Solve problem 97
This commit is contained in:
32
python/e091.py
Normal file
32
python/e091.py
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user