Problems > Decimal to Base K > Editorial

Decimal to Base K — Solution & Editorial

Back to the Problem

Standard repeated division by K, collecting remainders; map 10–15 to A–F.

Complexity: O(logK N)