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.
The test cases don't seem to work or am I missing something?
Input (stdin)
148 3
Your Output (stdout)
4 (which is correct - 1+4+8 = 13, 1+3 =4)
Expected Output
3
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
The test cases don't seem to work or am I missing something? Input (stdin) 148 3 Your Output (stdout) 4 (which is correct - 1+4+8 = 13, 1+3 =4) Expected Output 3
Agreed. So many problems here have incorrect test cases that are either just flat out wrong, or don't match the written requirements.
no it is true, 148 3 means 148148148 sum of its digits is 39. 39 -> 3 + 9=12. 12->1+2=3.
Thank you, didn't read it well enough...