Project Euler #132: Large repunit factors

Sort by

recency

|

3 Discussions

|

  • + 1 comment

    This is by far the hardest problem of any rep unit ones. The key thing is the information that a is multiple of 10. This means we must find up to 45 primes whose multiplicative order is of type 2^x * 5^y where x <= 9 and y <= 9. There is no need to calculate a^b as in case of Java can be extremely long taking into account large input values. While looping thru the list of primes we can't have any expensive operations, only simple modulo. I also handled special case where a has factor of prime > 334973.

    Hint: Max factor prime of rep unit we are interested in is: 670001

  • + 0 comments

    help please?

  • + 0 comments

    help please?

No more comments