Akuver's blog

By Akuver, history, 3 years ago, In English

I was wondering if there is a way to solve this problem. Suppose we have x^2 = k mod m, and we know the values of k and m. Now, is it possible to find z such that x = z mod m from only k & m ?

P.S.: Sorry for not using latex. I don't know how to do it on codeforces.

  • Vote: I like it
  • +9
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it +4 Vote: I do not like it

If $$$m$$$ is prime, Tonelli-Shanks is a fast algorithm.