def calc(n): print(n) if int(n/2)== 0: return n res = calc(int(n/2)) return res calc(10) 结果: 10 5 2 1