You are viewing a single comment's thread. Return to all comments →
python3 solution passed.
def superDigit(n, k): def add_digits(string): if len(string) == 1: return string result = sum(int(s) for s in string) return add_digits(str(result)) start = sum(int(s) for s in n) * k return add_digits(str(start))
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 →
python3 solution passed.