Last active
May 5, 2017 13:19
-
-
Save morsisko/cb41188e8299b29d6034ec278611fe04 to your computer and use it in GitHub Desktop.
Gynvael's Livestream #38 - propozycja rozwiązania zadania
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Python 3.5.2 | |
base64table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" | |
gynTable = ["QW==", "QT==", "QT==", "QQ==", "QU==", "Qd==", "QU==", "Qd==", | |
"QX==", "QV==", "QW==", "Qe==", "QT==", "QR==", "QU==", "QT==", | |
"QT==", "QU==", "QX==", "QU==", "QT==", "QR==", "QT==", "QQ==", | |
"QW==", "Qe=="] | |
for i in range(0, len(gynTable) - 1, 2): | |
left = (base64table.index(gynTable[i][1]) & 0xF) << 4 | |
right = base64table.index(gynTable[i+1][1]) & 0xF | |
print(chr(left+right), end="") | |
#result: c0MMun1C4t10n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment