Created
April 7, 2024 09:14
-
-
Save maehrm/e45cb5fe6aa9a709a3e34c9a2c2b048f to your computer and use it in GitHub Desktop.
『群論への第一歩』問題4-1
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
for g in range(12): | |
s = set() | |
i = 0 | |
while True: | |
v = (g * i) % 12 | |
if v in s: | |
break | |
s.add(v) | |
i += 1 | |
print(f"<{g:>2}> = {s}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
実行結果
< 0> = {0}
< 1> = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
< 2> = {0, 2, 4, 6, 8, 10}
< 3> = {0, 9, 3, 6}
< 4> = {0, 8, 4}
< 5> = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
< 6> = {0, 6}
< 7> = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
< 8> = {0, 8, 4}
< 9> = {0, 9, 3, 6}
<10> = {0, 2, 4, 6, 8, 10}
<11> = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}