You are viewing a single comment's thread. Return to all comments →
Python3
def superDigit(n, k): # Write your code here res = sum(int(i) for i in str(n)) * k while res > 10: res = sum(int(i) for i in str(res)) return res
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