Correct. Modular exponentiation is particularly easy in Python. See 
http://ideone.com/kyC9U for verification that this works, for small primes at 
least.



On 29 Feb 2012, at 19:28, Luis Eduardo Hernandez Torres <[email protected]> 
wrote:

> so, I suppose I need to use modular power for ...(b%mod) ^ mod-2 ...
> or I'm getting the wrong picture here?
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google Code Jam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-code?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to