본문 바로가기
Python

#11005_10진법수 B진법 변환

by 푸른달아흐렛밤 2021. 10. 4.
반응형
table = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
N, B = map(int, input().split())
answer = ""

while N !=0 :
	answer += table[N%B]
	N//=B

print(answer[::-1])

 

반응형