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.
At first I built my own magnitude function to determine the number of digits in a number but I realized that log10() does the job quite well.
This problem is as simple as brute forcing the math and keeping a list of n values and their corresponding answers. There are only 47 values but that's all I'll say, otherwise I would ruin this challenge for everyone.
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 →
At first I built my own
magnitude
function to determine the number of digits in a number but I realized thatlog10()
does the job quite well. This problem is as simple as brute forcing the math and keeping a list of n values and their corresponding answers. There are only 47 values but that's all I'll say, otherwise I would ruin this challenge for everyone.