def peach(sum): p = 1 for i in range(sum - 1): p = (p + 1) * 2 return p n = int(input("输入n(n>=2):")) print("第一天的桃子数为:", peach(n))
若有帮助,请采纳,谢谢!