4 test cases being passed, 6 not passed

Please tell me where I’m wrong

Hi @mohammadabdullahjawwad
This is because you are not using the property of modular exponential that is why in many cases your ans is going out of the range of long long. You have to use the following property everytime you multiply two numbers :
(ab)%c=((a%c)(b%c))%c

Here is your corrected code :

@Aayush , thanks man. You always tell me what I’m looking for!