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.
Lesson learned, read the output format properly. By the way, this problem is to a certain extent not as interesting as the original one, as we could play with mod cycle length in power of two, and is, as a result, not as dull as plug in this built-in method in this language and you are done, no need to care about why it works. I doubt if such approach is plausible for the general case. (Cycle Length of Power of Two)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #97: Large non-Mersenne prime
You are viewing a single comment's thread. Return to all comments →
Lesson learned, read the output format properly. By the way, this problem is to a certain extent not as interesting as the original one, as we could play with mod cycle length in power of two, and is, as a result, not as dull as plug in this built-in method in this language and you are done, no need to care about why it works. I doubt if such approach is plausible for the general case. (Cycle Length of Power of Two)