Sum of Digits in Base K Problem

Sum of Digits in Base K Problem — ExecCode Easy DSA Practice

Solve the Sum of Digits in Base K problem on ExecCode. Free online easy DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Description Given an integer n (in base 10) and a base k, return the sum of the digits of n after converting n from base 10 to base k. After converting, each digit should be interpreted as a base 10 number, and the sum should be returned in base 10. Examples Example 1 Input: n =…

Practice Sum of Digits in Base K free on ExecCode. Browse more ExecCode DSA problems.