Briefly, 

If you got the visible test, you probably know that all you need is the factors 
for one of the numbers, and the rest can all be got one by one out from that 
number.

The key to the large numbers is realizing that GCD is much easier to do than 
factoring in general.  So if you have two adjacent code values you can obtain a 
factor by taking their gcd.  (Except in the case where those values are the 
same, so you have to hunt for a spot where the numbers are different.)

On Monday, April 8, 2019 at 8:55:35 AM UTC-7, Lean Swift wrote:
> Im not asking for a code, but just the idea behind the solution about it. I 
> solved the example, but with high prime numbers obvs not.
> 
> Im pretty sure u dont have to mind at all the N prime numbers, and just find 
> out the prime numbers without computing all the prime numbers required. but 
> still my ideas can be not the right answer.
> 
> 
> For who has already solved it, what is the idea, solution to solve this 
> challenge? thx a lot.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/e465446f-73fd-457f-884b-89608a3e92a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to