Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = open("tests.in", "rb")
- out = open("out.txt", "wb")
- s = t.readline().split()[0]
- z = []
- lst = 0
- print(len(s))
- s = s.replace(b"\xd1\x8c", b"\xd0\xac")
- while s.find(b"\xd0\xac", lst) != s.find(b"."):
- z.append(s[lst:s.find(b"\xd0\xac", lst)])
- lst = s.find(b"\xd0\xac", lst) + 2
- z.append(s[lst:])
- for s in z:
- a = []
- for i in range(0, len(s), 22):
- c = s[i:i + 22]
- c = c.replace(b"\xd0\xab", b'1')
- c = c.replace(b"\xd1\x8b", b'0')
- a.append(int(c[::-1], 2))
- for i in a[::-1]:
- out.write(chr(i + 1).encode())
- out.write(b" ")
- out.close()
- outw = open("out.txt", "rb")
- outww = open("outw.txt", "wb")
- t = outw.readline().split()
- for i in t[::-1]:
- outww.write(i + b" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement