this is what i tried…but it passes only two testcases.
How to approach to this problem
Given three numbers a,b,c. Calculate (a^b)mod c.
@tusharbhardwaj127 you have to build your own power function which takes logn time
refer this
(https://www.geeksforgeeks.org/write-a-c-program-to-calculate-powxn/)