Please chek the code


what is wrong all test cases not passed

hey Deepak, ans=ans*(a%c) is incorrect as you must first multiply and then take mod.
correct expression - ans = (ans*a)%c

thanks sir for helping me