题解 | #汽水瓶#
汽水瓶
https://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f
n=int(input())
if n!=0:
i=0
while n>2:
i+=int(n/3)
n=int(n/3)+n%3
if n==2:
i+=1
print(i)
汽水瓶
https://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f
n=int(input())
if n!=0:
i=0
while n>2:
i+=int(n/3)
n=int(n/3)+n%3
if n==2:
i+=1
print(i)
相关推荐