Not able to clear test cases,

Can someone tell, where I am going wrong

here is your corrected code:

if this solves your doubt please mark it as resolved :slight_smile:

Hey Abha, Thanks a lot for your help, Can u please tell what is the problem in my function, that you have commented

hello @great
image

u were not doing mod c while calculating a^b due to which overflow was happening.

so see added mod in the highlighted lines.
and removed other function(it was not required)

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.