Modular Exponentiation

Ashi, can you pls explain, wht approach you have used in the code ?

i hv sent u my code along

Ashi, use this kind of approach in your code,
long long int exponent(long long int a,long long int b,long long int c)
{
long long int result=1;
while(b>0)
{
if(b&1)
{
result=(result * a)%c;
}
a=(a * a)%c;
b=b>>1;
}
return result;
}

Since you arent replying anything, I am marking this doubt as resolved… You can reopen it if u still face any issues…