July 19, 2021
def solution(n): temp = '' while n > 0: n, mod = divmod(n, 3) temp += str(mod) return int(temp, 3)
def solution(n): tmp = '' while n: tmp += str(n % 3) n = n // 3 answer = int(tmp, 3) return answer
GitHubVelogFacebook