python 解法 def drink_count(n): if n < 2: return 0 if n ==2: return 1 else: return n//3 + drink_count(n//3+n%3) if '__name__' == '__main__': while True: try: n = int(input()) if n == 0: break else: ...