[백준/python] 11005 진법변환2

조선영·2023년 8월 11일
0

python

목록 보기
11/27
post-thumbnail


최종 코드

arr = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s = ''

while(True):
  a, base = map(int, input().split())

  if base < 2 or base > 36:
    print('재입력')
    continue
  else:
    while a:
      s += str(arr[a%base])
      a //= base
    
    print(s[::-1], end='')
    break

profile
UX 기획도 하고 서비스 기획도 하고 PM도 하고 프론트도 하고 PL도 하는 중

0개의 댓글