3 条题解

  • 0
    @ 2024-2-9 19:16:13

    python:

    n = int(input())
    c = 0
    while True:
    if n % 2 == 0:
    n = n // 2
    else:
    n = n * 3 + 1
    c += 1
    if n == 1:
    break
    print(c)
    

    信息

    ID
    641
    时间
    1000ms
    内存
    16MiB
    难度
    9
    标签
    递交数
    7
    已通过
    6
    上传者