Варгин Артём Анатольевич, 321 группа EncPairs 14974
Jhinww EncPairs 15780
n1import itertoolsn1import codecs
2import sys2import sys
33
n4def decoder(text):n4def decode_text(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                    text2 = text.decode(enc3).encode(enc2).decode(enc1)n9                    re_text = text.decode(enc3).encode(enc2).decode(enc1
 >)
10                    if 'Зимбабве' in text2:10                    if 'Зимбабве' in re_text:
11                        return text211                        return re_text
12                except:12                except:
13                    continue13                    continue
14    return None14    return None
15text = sys.stdin.buffer.read()15text = sys.stdin.buffer.read()
t16print(decoder(text))t16print(decode_text(text))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op