Modular exponentiation doubt

The code failed to pass the Test case 9. Please check the code here : https://ide.codingblocks.com/s/337506

hello @shivanshu12800
use long long for a,b, c and then try

Yeah it worked!!..thank you!!