|  | 
|  | 
| back to board | To those who want to solve the problem without using too much math knowledge First of all, K is large but the range of n is small (<=32767 and is prime);So we can process the query with same n at the same time.
 
 And use brute-force method;
 
 Note if there are solutions there are exacly two solutions.
 
 x and n-x ((n-x)^2=x^2(mod n));
Re: To those who want to solve the problem without using too much math knowledge very nice :)Re: To those who want to solve the problem without using too much math knowledge Posted by Isidro  25 Oct 2011 02:25Can you explain me that better, I don't understand your idea. | 
 | 
|