### 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 .
#### ###
Problem CRYPTO1
#### ###