对于任意给定自然数,验证角谷猜想怎么运行
1)if a=奇数2)if a=偶数
m = int(input()) cnt=0 n=m while n!=1: if n%2==0: n=n//2 else: n=3*n+1 cnt+=1 print(f'数字{m}经过{cnt}步回到1')