3 Answers
New AnswerA neat mathematical trick: -n % k = k - (n % k). Meaning, to find (βn)%k, just find kβ(n%k). Have fun!
In python sign of result of mod is sign of denominator see this link and follow the links mentioned in link https://stackoverflow.com/q/3883004/7986108
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message