摘要: #3个瓶盖可以兑换一瓶饮料,买了n瓶饮料,一共可以喝到多少瓶def get_drink(n): total = 0 left = 0 while n>=3: total +=n left += n%3 if left>=3: total +=left//3 left = left%3 n = n// 阅读全文
posted @ 2022-03-30 18:57 coffee~ 阅读(319) 评论(0) 推荐(0) 编辑