We know that :
(x.y) mod m = ( (x mod m) . (y mod m) ) mod m
Is there any property for:
xy mod m like xmodmymodm mod m . I hope this fails.
I want to find an efficient way to solve:
x1.x2.x3...xiy1.y2.y3...yjmod m
where, xi,xj,m≤109;
and x1.x2.x3...xiy1.y2.y3...yj results in an integer
Edit: If a mod m= x and bmodm= y, then can we express (ab mod m) in terms of x, y and m ??
Any help will be appreciated :) Thanks
No comments:
Post a Comment