# BEBRA

Oct 28th, 2021
643
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. def f(A,B,C):
2.     return (not (not A or B)) or (((A and B and not C) or (not C and not B)) and (A and not C and A))
3.
4. def f1(a,b,c):
5.     return a or (b and not c)
6. def f2(a,b,c):
7.     return a and not c
8. def f3(a,b,c):
9.     return a or (not b and c)
10. def f4(a,b,c):
11.     return a and not (b and c)
12. def f5(a,b,c):
13.     return a and not b
14. def f6(a,b,c):
15.     return not a and b or c
16. def f7(a,b,c):
17.     return a or not (b and c)
18.
19. mas = [[],[],[],[],[],[],[],[]]
20.
21. for a in 0,1:
22.     for b in 0,1:
23.         for c in 0,1:
24.             mas[0].append([a,b,c,int(f(a,b,c))])
25.             mas[1].append([a,b,c,int(f1(a,b,c))])
26.             mas[2].append([a,b,c,int(f2(a,b,c))])
27.             mas[3].append([a,b,c,int(f3(a,b,c))])
28.             mas[4].append([a,b,c,int(f4(a,b,c))])
29.             mas[5].append([a,b,c,int(f5(a,b,c))])
30.             mas[6].append([a,b,c,int(f6(a,b,c))])
31.             mas[7].append([a,b,c,int(f7(a,b,c))])
32. for i in range(1,8):
33.     if mas[i] == mas[0]:
34.         print(i)
35.
36.
37.
RAW Paste Data