why my code is not getting submitted
https://ide.codingblocks.com/s/293717 here is my code
Modular Exponentiation
hello @jatinupadhyay786
to solve this problem u need to study about modular exponentiation technique.
so first read about it. and then try
can u send me a link please brother
here we are using (a*b)%c = ((a%c)*(b%c))%c i got it
i am not understanding ki
while (y > 0)
{
// If y is odd, multiply x with result
if (y & 1)
res = (res*x) % p;
// y must be even now
y = y>>1; // y = y/2
x = (x*x) % p;
}
return res;
issme hum kya kar rahe hai matlab odd even kyucheck kar rahe hai y ko?
bhai nahi aaya mujhe samjh ek bar aap poora explain kardo please?
i understood it well from here but now only three test cases are not passing
here is my codehttps://ide.codingblocks.com/s/301023
use long long in place of int
