problem. A character string that represents the number n, a number b1 that represents the base on which the number n is written, and a number b2 that is the base to convert the number n. Such that 10 <= n <= 20000000 y 2 <= b1, b2 <= 16. Entry A character string that represents the number n, a number b1 that represents the base on which the number n is written, and a number b2 that is the base to convert the number n. Such that 10 <= n <= 20000000 and 2 <= b1, b2 <= 16. Departure The number n converted to the base b2 Examples Input Example 1 7562
Python problem.
A character string that represents the number n, a number b1 that represents the base on which the number n is written, and a number b2 that is the base to convert the number n. Such that 10 <= n <= 20000000 y 2 <= b1, b2 <= 16.
Entry
A character string that represents the number n, a number b1 that represents the base on which the number n is written, and a number b2 that is the base to convert the number n. Such that 10 <= n <= 20000000 and 2 <= b1, b2 <= 16.
Departure
The number n converted to the base b2
Examples
Input Example 1
7562
10
2
Output Example 1
1110110001010
Input Example 2
7562
10
16
Output Example 2
1D8A
Input Example 3
34AF6519
16
2
Output Example 3
110100101011110110010100011001
Input Example 4
3854922
11
3
Output Example 4
110120111222122
Step by step
Solved in 2 steps