package backjoon; import java.util.ArrayList; import java.util.List; import java.util.Scanner; // https://www.acmicpc.net/problem/11005 public class mento11005 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] input = sc.nextLine().split(" "); sc.close(); int n = Integer.parseInt(input[0]); int b = Integer.parseInt(input[1]); List list = new ArrayList<>(); while(n > 0) { if (n % b < 10) { list.add((char) (n % b + '0')); } else { // 나머지가 10이상이면 A(10) B(11) C(12) ... Z(35) list.add((char) (n % b - 10 + 'A')); } n /= b; // b로 계속 나누기 } //출력 for(int i=0; i