Skip to content
UPEEC

Convert to Base B

Easy#math#number-systems· solved by 0 · time limit 2.0 s

Write the non-negative integer nn in base bb. Digits above 9 are A (10), B (11), … up to Z (35).

Input

Two integers nn and bb.

Output

nn in base bb.

Constraints

0≤n≤10180 \le n \le 10^{18}, 2≤b≤362 \le b \le 36

Sample 1

Input

10 2

Output

1010

Sample 2

Input

255 16

Output

FF

Sign in or join free to run and submit your solution.