Skip to content

Instantly share code, notes, and snippets.

@maehrm
Created April 7, 2024 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maehrm/e45cb5fe6aa9a709a3e34c9a2c2b048f to your computer and use it in GitHub Desktop.
Save maehrm/e45cb5fe6aa9a709a3e34c9a2c2b048f to your computer and use it in GitHub Desktop.
『群論への第一歩』問題4-1
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}")
@maehrm
Copy link
Author

maehrm commented Apr 7, 2024

実行結果

< 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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment