Advertisement
PikMike

Untitled

Dec 20th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. t = open("tests.in", "rb")
  2. out = open("out.txt", "wb")
  3. s = t.readline().split()[0]
  4. z = []
  5. lst = 0
  6. print(len(s))
  7. while s.find(b"\xd0\xac", lst) != s.find(b"."):
  8.     z.append(s[lst:s.find(b"\xd0\xac", lst)])
  9.     lst = s.find(b"\xd0\xac", lst) + 2
  10. z.append(s[lst:])
  11. for s in z:
  12.     a = []
  13.     for i in range(0, len(s), 22):
  14.         c = s[i:i + 22]
  15.         c = c.replace(b"\xd0\xab", b'1')
  16.         c = c.replace(b"\xd1\x8b", b'0')
  17.         a.append(int(c, 2))
  18.     for i in a:
  19.         out.write(chr(i).encode())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement