Романтовский Александр 522 EncPairs 15477
Чувашов Егор 523 EncPairs 15784
f1import sysf1import sys
n2encodings = ['koi8-r', 'cp1251', 'mac-cyrillic', 'cp866', 'iso8859-5', 'n2encodings = ['KOI8-R', 'CP1251', 'MACCYRILLIC', 'CP866', 'ISO-8859-5', '
>cp855']>CP855']
3text_bytes = sys.stdin.buffer.read()3line = sys.stdin.buffer.read()
4done = False4to_break = False
5for encoding1 in encodings:5for first_encoding in encodings:
6    if done:6    if to_break:
7        break7        break
8    try:8    try:
n9        decoded = text_bytes.decode(encoding1)n9        decoded = line.decode(first_encoding)
10        for encoding2 in encodings:10        for second_encoding in encodings:
11            if done:11            if to_break:
12                break12                break
13            try:13            try:
n14                encoded = decoded.encode(encoding2)n14                encoded = decoded.encode(second_encoding)
15                for encoding3 in encodings:15                for third_encoding in encodings:
16                    try:16                    try:
t17                        result = encoded.decode(encoding3)t17                        decoded2 = encoded.decode(third_encoding)
18                        if 'Зимбабве' in result:18                        if 'Зимбабве' in decoded2:
19                            print(result)19                            print(decoded2)
20                            done = True20                            to_break = True
21                            break21                            break
22                    except:22                    except:
23                        pass23                        pass
24            except:24            except:
25                pass25                pass
26    except:26    except:
27        pass27        pass
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op