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 have implemented an efficient solution for the problem that can calculate the answer to the original euler project question (sum under 999966663333 answer not modular) however I'm struggling to compute the answer in the 10^18 range modulo 1004535809.
The sieving I'm using is very efficient and the calculations are fast too, however sieving up to 10^9 will be pretty intensive even for the best sieves.
Does anyone know about any resource on modular arithmetic that I could read to try and optimize the program by reducing the range using the module? Thanks
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #234: Semidivisible numbers
You are viewing a single comment's thread. Return to all comments →
I have implemented an efficient solution for the problem that can calculate the answer to the original euler project question (sum under 999966663333 answer not modular) however I'm struggling to compute the answer in the 10^18 range modulo 1004535809. The sieving I'm using is very efficient and the calculations are fast too, however sieving up to 10^9 will be pretty intensive even for the best sieves. Does anyone know about any resource on modular arithmetic that I could read to try and optimize the program by reducing the range using the module? Thanks