Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
66869 胡海峰老师 角谷猜想 Python3 Accepted 28 MS 3784 KB 202 2024-03-10 18:39:25

Tests(5/5):


Code:

n = int(input()) while n!=1: if n%2==0: print( "{}/2={}".format(n,n//2)) n //=2 else: print("{}*3+1={}".format(n,n * 3 +1 )) n = n * 3 +1 print("End")