Modular Exponentiation

1 test case is failing.I suspect it is nodulus with 0 but I do not not know what to do in that case.

Use long long int instead of only int and then try to submit your code…