Created
May 9, 2020 15:28
-
-
Save kusano/07df18376cd37f367bcf210ae775dcc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b0:0b | |
b1:1b | |
b+:|0000000000000000000000000000000000000000000000000000000000000000c | |
c0:0c | |
c1:1c | |
c:> | |
0x:x0 | |
1x:x1 | |
<x:x< | |
zx:xz | |
Zx:xZ | |
0X:X0 | |
1X:X1 | |
<X:X< | |
zX:Xz | |
ZX:XZ | |
0y:y0 | |
1y:y1 | |
|y:y| | |
<y:y< | |
xy:yx | |
Xy:yX | |
zy:yz | |
Zy:yZ | |
0Y:Y0 | |
1Y:Y1 | |
|Y:Y| | |
<Y:Y< | |
xY:Yx | |
XY:YX | |
zY:Yz | |
ZY:YZ | |
Wyx:Z | |
WYx:Wz | |
WyX:Wz | |
WYX:WZ | |
Wy:Z | |
WY:Wz | |
yx:z | |
Yx:Z | |
yX:Z | |
YX:Wz | |
0|:x| | |
1|:X| | |
yz:zz | |
yZ:zZ | |
Yz:Zz | |
YZ:ZZ | |
0>:y> | |
1>:Y> | |
xz:zz | |
xZ:zZ | |
Xz:Zz | |
XZ:ZZ | |
Wx:Z | |
WX:Wz | |
x:z | |
X:Z | |
y:z | |
Y:Z | |
z:0 | |
Z:1 | |
W:1 | |
000000000000000000000000000:00000000000000000000000000 | |
00000000000000000000000000: | |
<|>:: | |
:<b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code = """b0:0b | |
b1:1b | |
b+:|0000000000000000000000000000000000000000000000000000000000000000c | |
c0:0c | |
c1:1c | |
c:> | |
0x:x0 | |
1x:x1 | |
<x:x< | |
zx:xz | |
Zx:xZ | |
0X:X0 | |
1X:X1 | |
<X:X< | |
zX:Xz | |
ZX:XZ | |
0y:y0 | |
1y:y1 | |
|y:y| | |
<y:y< | |
xy:yx | |
Xy:yX | |
zy:yz | |
Zy:yZ | |
0Y:Y0 | |
1Y:Y1 | |
|Y:Y| | |
<Y:Y< | |
xY:Yx | |
XY:YX | |
zY:Yz | |
ZY:YZ | |
Wyx:Z | |
WYx:Wz | |
WyX:Wz | |
WYX:WZ | |
Wy:Z | |
WY:Wz | |
yx:z | |
Yx:Z | |
yX:Z | |
YX:Wz | |
0|:x| | |
1|:X| | |
yz:zz | |
yZ:zZ | |
Yz:Zz | |
YZ:ZZ | |
0>:y> | |
1>:Y> | |
xz:zz | |
xZ:zZ | |
Xz:Zz | |
XZ:ZZ | |
Wx:Z | |
WX:Wz | |
x:z | |
X:Z | |
y:z | |
Y:Z | |
z:0 | |
Z:1 | |
W:1 | |
000000000000000000000000000:00000000000000000000000000 | |
00000000000000000000000000: | |
<|>:: | |
:<b""".split("\n") | |
def test(S): | |
while True: | |
for c in code: | |
if "::" in c: | |
end = True | |
a, b = c.split("::") | |
else: | |
end = False | |
a, b = c.split(":") | |
if b==" ": | |
b = "" | |
if a in S: | |
S = S.replace(a, b, 1) | |
if end: | |
return S | |
break | |
else: | |
return S | |
import random | |
while True: | |
A = random.randint(1, 65535) | |
B = random.randint(1, 65535) | |
S = bin(A)[2:]+"+"+bin(B)[2:] | |
a = test(S) | |
if a!=bin(A+B)[2:]: | |
print S, a, bin(A+B)[2:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment