用while(直接超时)
a = int(input()) s = 0 while a != 1: if a % 2 == 0: a /= 2 s+=1 else: a * 3 + 1 s+=1 print(s)
nice!!
c++党拍手叫好
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
没有必要用while循环,用其他方法也不是不可
棒~
共 6 条回复
c++党拍手叫好
c++党拍手叫好
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
c++党拍手叫好
没有必要用while循环,用其他方法也不是不可
棒~