You are viewing a single comment's thread. Return to all comments →
One-line Python solution:
def superDigit(n, k): return n if len(n) < 2 \ else superDigit(str(reduce(lambda x, y: int(x) + int(y), n) * 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 →
One-line Python solution: