We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defsuperDigit(n,k):# Write your code hereiflen(n)==1:returnn[0]else:n=[int(num)fornuminn]v=[int(num)fornuminstr(sum(n)*k)]whilelen(v)!=1:v=[int(num)fornuminstr(sum(v))]returnv[0]``
Cookie support is required to access HackerRank
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 →