Skip to main content
Challenges Modular arithmetic: remainders
Cryptography Easy Modular remainders Solves: 12

Modular arithmetic: remainders

Author: CyberSamSU
Points
12

Modular arithmetic is "clock arithmetic". If the time is 21:00 and another 5 hours pass, the result will not be 26, but 2: 26 mod 24 = 2. Almost all cryptography algorithms (RSA, Diffie-Hellman, ECC) are built on this arithmetic.

The most important rule: there is no need to wait until the end to take the remainder. (a + b) mod m = ((a mod m) + (b mod m)) mod m and (a · b) mod m = ((a mod m) · (b mod m)) mod m. Therefore, even when working with very large numbers, the numbers remain small.

The following values are given. Calculate (a · b + a + b) mod m.

m = 9635539
a = 707578474118614329902287107913392066437714860703441138943546
b = 614421098742138190161820615784721212621437577387068715412159

Answer: only a number — in decimal format, without spaces and additional characters (for example 1234).

Hints 2
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −1 pts Log in
Hint 2 −2 pts Log in
To submit a flag, log in.

First solvers

1. Лазиз 04.10.2026
2. Mirjaxon Qaxxarov 26.10.2026
3. Odam 04.11.2026
4. ya_d0na 11.11.2026
5. Doston Allayarov 12.11.2026
6. Jasmin Xuseinova 15.11.2026
7. milanchka_26 19.11.2026
8. Abdinazarova 19.11.2026
9. farang1z_06 20.11.2026
10. Zulxumor 23.11.2026