Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import *
- def f(x, y, z, w):
- return w and ((x <= y) == (y <= z))
- for a in product([0, 1], repeat = 6):
- table = [(0, a[0], a[1], a[2]), (0, 0, a[3], 0), (0, a[4], a[5], 0)]
- if len(table) == len(set(table)):
- for p in permutations('xyzw'):
- if [f(**dict(zip(p, r))) for r in table] == [1, 1, 1]:
- print(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement