Created
September 6, 2021 10:55
-
-
Save shakayami/88f0e286049c3efc5cef06158c6ee470 to your computer and use it in GitHub Desktop.
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
mex=1 | |
while(True): | |
print(mex) | |
X=mex | |
S={X} | |
while(X>1): | |
if X%2==0: | |
X//=2 | |
else: | |
X=3*X+1 | |
if X<mex: | |
break | |
elif X in S: | |
print("hanrei",X) | |
assert False | |
else: | |
S.add(X) | |
mex+=1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment