Introduction to Number Theory

Mathematical foundations for CP

You know basic modular arithmetic and GCD. I'll show you techniques that appear in Codeforces 18001800-21002100 rated problems: Euler's totient function, the Chinese Remainder Theorem, prime factorization tricks, and Diophantine equations.

These problems test mathematical reasoning more than implementation skill. You'll learn to recognize number-theoretic structure and apply the right theorem.