Test cases not passing

some test cases are not passing

@kamakshi.behl22 you have simply taken power and calculated modulo of result this will give you wrong answer for sure.
there comes specific ways for modular exponentiation that must be in your course try using that efficient approach for this problem.

i am not able to think of a solution. please help!

here is the code based on above technique https://ide.codingblocks.com/s/217446

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.