Some testcases are failing

https://hack.codingblocks.com/contests/c/528/743
https://ide.codingblocks.com/s/65514

Hi Gaurav, you do need to use recursion here. Just use a property that:

let res = 1 ;
then :
(a^b)%c =
i: 0 -> b
res = (res*a) % c ;

Hope this helps :slight_smile:

thank you…

Hey Gaurav, when your doubts are resolved… please mark them as resolved on your online platform.

1 Like