Getting testcase #10 wrong

problem is MODULAR EXPONENTIATION
my code:: https://ide.codingblocks.com/s/77981