We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Recursive Digit Sum
- Discussions
Recursive Digit Sum
Recursive Digit Sum
Sort by
recency
|
522 Discussions
|
Please Login in order to post a comment
Swift
occuring weird errors:
148 3 -> superDigit is 4, expected output: 3 failed
9875 3 -> superDigit is 2, expected output: 8 failed
123 3 -> superDigit is 6, expected output: 9 failed
is it some bug of hackerank code or am I missing something?
Python
def superDigit(n, k): def calculating(num): summ = 0 for digit in str(num): summ += int(digit) return summ
C++ 20
Java recursive