143. Decimal to Any Base
EasyNumber Bases
Convert n to base b (2 ≤ b ≤ 36), using digits 0–9 then uppercase A–Z.
Input format
A single line: n b
Output format
n in base b.
Example 1
Input
255 16
Output
FF
Example 2
Input
10 2
Output
1010
Constraints
0 ≤ n ≤ 10¹⁸
Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.
Loading the MyLoginn IDE…