Digit Sum in Base
Medium · rating 1300 · Math, Number Theory
Read a non-negative integer n and a base b. Print the sum of n's digits when written in base b.
Constraints: 0 ≤ n ≤ 1015, 2 ≤ b ≤ 36
Related problems
- Modular Exponentiation — Medium
- GCD of an Array — Medium
- LCM of Array — Medium
- Primality Test — Medium
- Sum of Divisors — Medium
- Greatest Common Divisor — Medium