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.
It's just a implementation which loops from 1 to 9 to check the length of pow(i, N). Doesn't even need to store or sort the answers. The funny part at the beginning is to observe the growth of the number of digits for different powers, and the rest is trivial. Frankly, the original problem is more interesting, as you can also observe that all except are invalid answers.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #63: Powerful digit counts
You are viewing a single comment's thread. Return to all comments →
It's just a implementation which loops from
1
to9
to check the length ofpow(i, N)
. Doesn't even need to store or sort the answers. The funny part at the beginning is to observe the growth of the number of digits for different powers, and the rest is trivial. Frankly, the original problem is more interesting, as you can also observe that all except are invalid answers.