[BOJ / Python] 11005 진법 변환 -2

도니·2023년 4월 7일

BOJ / Python

목록 보기
48/105
post-thumbnail

문제

백준 11005 진법 변환 -2
업로드중..

코드

#BOJ 11005 진법 변환 2

N, B = map(int, input().split())
nums = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'

ans = ''
while N != 0:
    ans += str(nums[N % B])
    N = N // B

print(ans[::-1])
profile
Where there's a will, there's a way

0개의 댓글