← Back to List

14491번: 9진수 ↗

Solutions

Python 3
152 B | 152 chars
n = int(input())
ret = []
while(n>0):
    ret.append(n%9)
    n//=9
if len(ret) == 0:
    print(0)
else:
    for i in ret[::-1]:
        print(i,end="")