Farz0l1x

Untitled

Mar 4th, 2023
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. from itertools import *
  2. def f(x, y, z, w):
  3.     return (not(y)) and x and ((not(z)) or w)
  4. table = [(0, 1, 0, 0), (1, 1, 0, 0), (1, 1, 1, 0)]
  5. for p in permutations('wxyz'):
  6.     if [f(**dict(zip(p, r))) for r in table] == [1, 1, 1]:
  7.         print(p)
Advertisement
Add Comment
Please, Sign In to add comment