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.
Easy, really? Two whole days and I haven't managed to find a O(1) solution.
Used double memorization and some optimization.
Final timing for N=100000 is 0.2 seconds.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #29: Distinct powers
You are viewing a single comment's thread. Return to all comments →
Easy, really? Two whole days and I haven't managed to find a O(1) solution. Used double memorization and some optimization. Final timing for N=100000 is 0.2 seconds.