# Modular Congruence

### Basic <a href="#basic" id="basic"></a>

In modular congruence, the following rules apply:

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

So if we have the following problem,

```shellscript
39 ≡ x mod 8
```

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

```shellscript
x = 39 % 8
print(x)
```

### References <a href="#references" id="references"></a>

* [CryptoHack](https://cryptohack.org/courses/modular/ma0/)
