📅  最后修改于: 2022-03-11 14:46:40.853000             🧑  作者: Mango
n = int(input())
base = 3
if n == 0:
print(0)
nums = []
while n:
n, r = divmod(n, base)
nums.append(str(r))
print(''.join(reversed(nums)))