finding a solution for 2^x = c mod 10^9+7

Revision en1, by hiddentesla, 2017-05-27 16:02:30

problem:

given at most 400 values of C. for each C,find an integer X (X<=10^18) such that 2^x mod (10^9 + 7) = c

i know that a value x must exist (X<10^9 + 7).but finding X is a problem for me. is there an efficient way to find x?

Tags numbertheory, modular arithmetic

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hiddentesla 2017-05-27 16:02:30 277 Initial revision (published)