I got this solution when was reading a book about competitive programming to avoid mod calculus with very large numbers. But I would like to know why it's trustworthy.
Asked
Active
Viewed 1,133 times
0
-
Write $a$ as $xc+v$ and $b$ as $yc+w$ where $0 \le v < c$ and $0 \le w < c$. Then both sides are equivalent to $v w \mod c$ – Henry Jul 29 '21 at 01:57
-
See this answer in the 2nd linked dupe for the easy way to prove this. – Bill Dubuque Jul 29 '21 at 09:54