Https://ide.codingblocks.com/s/463581

its only passing two three test cases

hello @architsuryavanshi
U have misunderstood the problem.
In the question they are asking u to compute.

( a raise to the power b) % c

now also its not working only three of test cases are passing

…

becuase of overflow it is not passing.
dont compute a raise to b and then take mod.
instead take mod while computing a raise to b.

refer this->

also there is modular exponentitation technique , read about it to solve this problem efficiently