본문 바로가기
python-algorithm

백준 14491 9진수

by 무적김두칠 2021. 11. 28.

1
2
3
4
5
6
7
def nine(n):
    ans=''
    while n>0:
        ans+=str(n%9)
        n=n//9
    return ans[::-1]
print(nine(int(input())))
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 23037 5의 수난  (0) 2021.11.29
백준 9063 대지  (0) 2021.11.28
백준 6679 싱기한 네자리 숫자  (0) 2021.11.19
백준 2858 기숙사 바닥  (0) 2021.11.19
백준 14782 Bedtime Reading, I  (0) 2021.11.19

댓글