Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69801 潘允晨 角谷猜想 Python3 Wrong Answer 32 MS 3740 KB 216 2024-04-06 20:08:50

Tests(0/5):


Code:

a=int(input("请输入一个正整数:")) while a!=1: if a%2==0: print("{}/2={}".format(a,a//2)) a =a // 2 else: print("{}*3+1={}".format(a,a*3+1)) a=a*3+1 print("End")


Run Info:

------Input------
100
------Answer-----
100/2=50 50/2=25 25*3+1=76 76/2=38 38/2=19 19*3+1=58 58/2=29 29*3+1=88 88/2=44 44/2=22 22/2=11 11*3+1=34 34/2=17 17*3+1=52 52/2=26 26/2=13 13*3+1=40 40/2=20 20/2=10 10/2=5 5*3+1=16 16/2=8 8/2=4 4/2=2 2/2=1 End
------Your output-----