May anbody give me the link of the matrix exponentiation SPOJ-SPP solution link

I am unable to find error in my code

my code link : https://ide.codingblocks.com/s/342093

now its working for the test case but giving wrong answer on SPOJ platform.
Please help me!