Even though I'm looking to solve the problem, could anyone also point me out any sort of "strategy" to solve similar exercises?
I know the things I must make use of most are the congruence properties and Fermat's little theorem, but I have a hard time applying them and finding out how to solve a problem.
Any help is greatly appreciated.