Modular Exponentiation

many test cases are not getting cleared. I am not getting why it is showing wrong answer.