Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [[1, 2, 3, 4, 5], [7, 8, 9, 10, 11]]
- cnt = 0
- for e in a:
- f = False
- for i in range(5):
- b = e.copy()
- b.pop(i)
- if (b[0] + b[1]) / 2 == (b[2] + b[3]) / 2 == e[i]:
- f = True
- if (b[0] + b[2]) / 2 == (b[1] + b[3]) / 2 == e[i]:
- f = True
- if (b[0] + b[3]) / 2 == (b[1] + b[2]) / 2 == e[i]:
- f = True
- if f:
- cnt += 1
- print(cnt)
Advertisement
Add Comment
Please, Sign In to add comment