浙大Python 第4章-3 猴子吃桃问题 (15 分)

原题题目

在这里插入图片描述



代码实现

days = int(input());totalpeaches = 1
while days>=2 :
    totalpeaches = (totalpeaches+1)*2
    days-=1
print(totalpeaches)


提交结果

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_37500516/article/details/114376990