n = int(input()) ls = [] while n>0: ls.append(n) n //= 2 #整除 print(ls)
收起
n = int(input()) 这里只输入整数,否则报错的
报告相同问题?