All the test cases not passing

I used the property here:
(a^b)%c = ((a%c)^b)%c.
How can i optimize the code

hello @hemantomer1
use modular exponentiation technique.
if u r not aware of this technique then learn it from here
-> https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-arithmetic/

Just one test case is not working

pls share ur code using cb ide

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.