Badry's blog

By Badry, history, 9 years ago, In English

Hi Codeforces, I want to know if there is an efficient way to solve a^(x) = b mod(m) where x is the unknown value and m is some prime <=10^9 thanks in advance.

  • Vote: I like it
  • -8
  • Vote: I do not like it

»
9 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Here. For numbers up to 10^9, baby-step giant-step will be sufficient.