Modular exponentiation problem

Why my code is not passing seven test cases?If there is another solution to the problem can you explain it?
my code:-
https://codeshare.io/5MolYR

Modular Exponentiation has a algorithm, pow(x,y) you are using will fail on large numbers that is why you are getting wrong answer.

Tip: study the algorithm of modular exponentiation.
Hit Like if you get it!
Cheers

1 Like

Where is modular exponentiation algorithm?Sir,has given any lecture on it or I could search on Google.


.
.


.
.
1 Like