题解 | #汽水瓶#

汽水瓶

http://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f

def bottle(n,sum_re): if n==3 or n ==2: sum_re +=1 return sum_re else: a = n//3 b = n%3+a sum_re += a return bottle(b, sum_re) list1 = [] while True: try: a = int(input()) list1.append(a) except: break

for i in list1: if i ==0: break else: sum_re = 0

    print(bottle(i,sum_re))
    
全部评论

相关推荐

挣K存W养DOG:入职送金条全球游,路过缅甸停一下🐔
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务