icon

Modular Congruence

Last modified: 2023-09-02

Basic

In modular congruence, the following rules apply:

If `a ≡ b mod c`, then `b ≡ a mod c`

So if we have the following problem,

39 ≡ x mod 8

To find x value, we can calculate it as below using Python.

x = 39 % 8
print(x)