Quote:
Originally Posted by MaskedMenace
Let 28! mod 31 = P
30! mod 31 = 30
2P mod 31 = 30
2P = 31k + 30
p = (31k + 30)/2
k = 0 => P = 15
so, effective remainder is 15*2 = 30
ankur can u post ur method ? i checked it and getting 30 ...
|
my method is no different from yours.
P = 15, you got it correctly but after that why to multiply it by 2. we didn't divide previously.
31k + 15 = 2g
k = 1
remainder is 46