You are viewing a single comment's thread. Return to all comments →
Typescript Solution
if (n.length === 1) { return +n; } let sum: number = n.split('') .reduce((a, b) => { return +a + +b }, 0); sum *= k; return superDigit(sum.toString(), 1) ;
Seems like cookies are disabled on this browser, please enable them to open this website
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
Typescript Solution