You are viewing a single comment's thread. Return to all comments →
I have to say that it was a really challenging one. Some suggestions if you feel stuck like me several times trying to solve it.
Try to solved it using Euler's totient funtion: look for the smallest divisor, d, of phi(9n) such that 10^d is equiv to 1 under (mod 9n).
phi, divisors, and 10^d mod 9n, should be implemented as efficient as possible.
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #129: Repunit divisibility
You are viewing a single comment's thread. Return to all comments →
I have to say that it was a really challenging one. Some suggestions if you feel stuck like me several times trying to solve it.
Try to solved it using Euler's totient funtion: look for the smallest divisor, d, of phi(9n) such that 10^d is equiv to 1 under (mod 9n).
phi, divisors, and 10^d mod 9n, should be implemented as efficient as possible.