You are viewing a single comment's thread. Return to all comments →
Thanx for contribution . Why echo 9;
If the remainder is zero( when we perform (n*k)%9) it means the sum of digits is 9.
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
Thanx for contribution . Why echo 9;
If the remainder is zero( when we perform (n*k)%9) it means the sum of digits is 9.