Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(x):
- x,y,w,z = map(int,x)
- return ((not y or x) or (not z and w)) == (w == x)
- n = 4
- for i in range(2**n):
- x = bin(i)[2:]
- x = '0' * (n-len(x)) + x
- if f(x):
- print(x,f(x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement