๋ฌธ์
https://programmers.co.kr/learn/courses/30/lessons/12899
ํ์ด
# ํ๋ก๊ทธ๋๋จธ์ค 2๋จ๊ณ - 124 ๋๋ผ์ ์ซ์
def solution(n):
answer = ''
while n:
if n % 3:
answer += str(n%3)
n //= 3
else:
answer += "4"
n = n//3 - 1
return answer[::-1]