Modular exponential

question: https://ide.codingblocks.com/s/130832
answer : https://ide.codingblocks.com/s/130832 its not working for certain test cases

hey @dhruvika, here constraints are : 1<=a,b,c<=100000, int or long long int will overflow for when a and b will have large values,
hint : (ab)%c is equals to ((a%c)(a%c))%c
try to use this in ur code