Skip to content

Baekjoon 11005

1. Problem

문제 확인하기

2. Solution

nums = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n, b = map(int,input().split())
ans = ''

while n:
    ans = nums[n % b] + ans
    n //= b

print(ans)