You are viewing a single comment's thread. Return to all comments →
function superDigit(n, k) { if(n.length === 1){ return n } let p = 0 for(const num of n){ const z = k*Number(num) p+=z } return superDigit(p.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 →