최종 코드
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