Can not seem to figure out the edge cases

the question seems to be pretty straight forward but still cant pass all test cases

hello @pradyumn25jain
no it is not that easy.
reason is a^k can be really very big number which we cant compute using pow because overflow will occur.

that why we use a technique call modular exponentiation.
read about it and then implement it

ohh alright thanks will read about it

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.