Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 931 Bytes

Ep4-Modular-Arithmetic.md

File metadata and controls

25 lines (15 loc) · 931 Bytes

Part 2 Episode 4/4: Modular Arithmetic

Knowledge of modular arithmetic and properties of the mod operator are quite important when it comes to CC.

In fact, you'll often see problems asking you to report the answer modulo some number like 1000000007 in which case this article will definitely benefit you.

Tutorial on Modular Arithmetic

Tutorial on Binary Exponentiation

Tutorial on Modular Inverse


Here are some links to practice modular arithmetic based problems:

  1. https://codeforces.com/problemset/problem/913/A
  2. https://open.kattis.com/problems/modulararithmetic
  3. https://codeforces.com/problemset/problem/1085/B
  4. https://codeforces.com/contest/1514/problem/C

Challenge Problem:

  1. https://codeforces.com/problemset/problem/603/B?locale=en