You are viewing a single comment's thread. Return to all comments →
Python 3
def superDigit(n, k): # check single digits if k == len(n) == 1: return int(n) res = 0 for num in n: res += int(num) return superDigit(str(res*k),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 →
Python 3