Last active
February 1, 2026 04:19
-
-
Save nennneko5787/82f9c20a2e6ee7bf42823df1d8551cfc to your computer and use it in GitHub Desktop.
某ゲーム
This file contains hidden or 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
| def getEventCodeByUserIndex(i: int): | |
| converted = i * 3 + 3054 | |
| return ( | |
| str(converted) | |
| .replace("0", "A") | |
| .replace("1", "R") | |
| .replace("2", "V") | |
| .replace("3", "O") | |
| .replace("4", "W") | |
| .replace("5", "K") | |
| .replace("6", "H") | |
| .replace("7", "Z") | |
| .replace("8", "M") | |
| .replace("9", "X") | |
| ) | |
| def getUserIndexByEventCode(ec: str): | |
| converted = int( | |
| str(ec) | |
| .replace("A", "0") | |
| .replace("R", "1") | |
| .replace("V", "2") | |
| .replace("O", "3") | |
| .replace("W", "4") | |
| .replace("K", "5") | |
| .replace("H", "6") | |
| .replace("Z", "7") | |
| .replace("M", "8") | |
| .replace("X", "9") | |
| ) | |
| return (converted - 3054) // 3 | |
| print(getEventCodeByUserIndex(1)) | |
| print(getUserIndexByEventCode("ARVOWKH")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment