Math Fundamentals18 sections · 814 units
Open in Course

Intro

(The Goal)

Modular arithmetic is the mathematics of remainders. It shows up in every programming contest because it prevents overflow and keeps numbers manageable.

In this section, I will show you clock arithmetic, the mod operator, and the properties that make it work. You will see why problems ask for answers mod 10^9 + 7, and how to compute huge powers without overflow.

By the end, you will handle modular operations confidently and understand the patterns that appear in contest problems.