Farz0l1x

Untitled

Mar 3rd, 2023
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. from itertools import *
  2. def f(a, b, c, d):
  3.     return ((a and b) == (not(c))) and (b <= d)
  4. table = [(1, 0, 0, 0), (1, 0, 1, 0), (1, 0, 1, 1), (1, 1, 0, 0)]
  5. for p in permutations('abcd'):
  6.     if [f(**dict(zip(p, r))) for r in table] == [1, 1, 1, 1]:
  7.         print(p)
Advertisement
Add Comment
Please, Sign In to add comment