hi all
i have problem on working with mod operation on big numbers.
e.g
(a+b)%10000000007 where a and b are both unsigned long long in cpp
both a and b are near to LLONG_MAX.
value of both are being changed by some fixed operation like multiplication iteratively.
Now i am confused in following.is it right or not?
(a+b)%10000000007=a%10000000007+b%10000000007
and same thing with multiplication
(a*b)%10000000007=(a%10000000007)*(b%10000000007)
please help me in this concept.
With Regards
Jaini