News for hackers. Stuff that matters.
Re:Mod and remainder are not the same by akrasuski1 on Thursday August 23, 2018 @08:10AM (#17826518)
Well, that's why I always define RED(x) (for reduce modulo) as ((((x) % MOD) + MOD) % MOD). Quite useful in algorithmic competitions, which often ask you for answer modulo some prime.

There are no comments on this comment yet.