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.
I wonder how many digits would it be if it is base and the number is . One digit? How do you count ? or ?
EDIT: The answer is the latter one. This implies that the upper bound of the digit sum for bases can be beyond . I used (100 / len(str(B-1)) + 1) * (B - 1).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #119: Digit power sum
You are viewing a single comment's thread. Return to all comments →
I wonder how many digits would it be if it is base and the number is . One digit? How do you count ? or ?
EDIT: The answer is the latter one. This implies that the upper bound of the digit sum for bases can be beyond . I used
(100 / len(str(B-1)) + 1) * (B - 1)
.