You are viewing a single comment's thread. Return to all comments →
My python solution:
def superDigit(n, k): def sD(x): if len(x)==1: return x return sD(str(sum(map(int,str(x))))) num = str(sum(map(int,str(n)))*k) return sD(num)
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 →
My python solution: