### The problem link is : here(www.spoj.com/problems/CRYPTO1) . I am aware of quadratic residue , and understood that part of the problem , my issue is with the implementation in converting the obtained answer to the date form .
#### ###
#### ###
The problem is mentioned here .
The editorial is not clear enough for me . Can anybody help me ?