Jhinww EncPairs 15780
Варгин Артём Анатольевич, 321 группа EncPairs 14974
n1import codecsn1import itertools
2import sys2import sys
33
n4def decode_text(text):n4def decoder(text):
5    for enc1 in ['KOI8-R', 'CP1251', 'MACCYRILLIC', 'CP866', 'ISO-8859-55    for enc1 in ['KOI8-R', 'CP1251', 'MACCYRILLIC', 'CP866', 'ISO-8859-5
>', 'CP855']:>', 'CP855']:
6        for enc2 in ['KOI8-R', 'CP1251', 'MACCYRILLIC', 'CP866', 'ISO-886        for enc2 in ['KOI8-R', 'CP1251', 'MACCYRILLIC', 'CP866', 'ISO-88
>59-5', 'CP855']:>59-5', 'CP855']:
7            for enc3 in ['KOI8-R', 'CP1251', 'MACCYRILLIC', 'CP866', 'IS7            for enc3 in ['KOI8-R', 'CP1251', 'MACCYRILLIC', 'CP866', 'IS
>O-8859-5', 'CP855']:>O-8859-5', 'CP855']:
8                try:8                try:
n9                    re_text = text.decode(enc3).encode(enc2).decode(enc1n9                    text2 = text.decode(enc3).encode(enc2).decode(enc1)
>) 
10                    if 'Зимбабве' in re_text:10                    if 'Зимбабве' in text2:
11                        return re_text11                        return text2
12                except:12                except:
13                    continue13                    continue
14    return None14    return None
15text = sys.stdin.buffer.read()15text = sys.stdin.buffer.read()
t16print(decode_text(text))t16print(decoder(text))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op