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 noticed that too, and ended up getting around it with modular exponentiation and a couple of other tricks, ultimately achieving a runtime of order O(sqrt(b) log(b)). When I saw how fast it ran, it felt a little bit like I'd used a cannon to swat a mosquito...... :-3
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #71: Ordered fractions
You are viewing a single comment's thread. Return to all comments →
I noticed that too, and ended up getting around it with modular exponentiation and a couple of other tricks, ultimately achieving a runtime of order O(sqrt(b) log(b)). When I saw how fast it ran, it felt a little bit like I'd used a cannon to swat a mosquito...... :-3