How to solve there questions?

i am not getting the correct answer. please explain??

hello @rabhi1611
please share ur code using cb ide

@rabhi1611

image
this is not correct.

also dont use pow function number a^b is very big number we can not compute direclty, use modular exponentiation technique to solve this problem.

modular exponentiation