Created
December 25, 2020 18:23
-
-
Save hyperneutrino/effd09f67a4eaaaa6b70b51212aa22ad 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 jrange(x, y): | |
| return list(range(x, y)) | |
| CurrLen = 8 | |
| def Find(): | |
| global CurrLen | |
| NotA = [chr(i) for i in jrange(9, 13) + jrange(32, 60) + jrange(62, 126)] | |
| A = "a" # 61 | |
| Ans = [None] * 1631129 | |
| C = list(A * 8) | |
| Output = lambda x: Ans.append("".join(x)) | |
| def Edit2(): | |
| for Pos1 in jrange(1, CurrLen - 1): | |
| for Pos2 in jrange(Pos1 + 1, CurrLen): | |
| for Char1 in NotA: | |
| C[Pos1] = Char1 | |
| for Char2 in NotA: | |
| C[Pos2] = Char2 | |
| Output(C) | |
| C[Pos1] = C[Pos2] = A | |
| def Edit1(): | |
| for Pos in jrange(1, CurrLen): | |
| for Char in NotA: | |
| C[Pos] = Char | |
| Output(C) | |
| C[Pos] = A | |
| def AddA(): | |
| global CurrLen | |
| CurrLen += 1 | |
| C.append(A) | |
| Output(C) | |
| AddA() | |
| Edit1() | |
| Output(C) | |
| for Tmp in jrange(10, 12): | |
| AddA() | |
| Edit2() | |
| Edit1() | |
| Output(C) | |
| return Ans | |
| print([x for x in Find() if x]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment