Concept Flow - Modular Arithmetic Basics
Start with two numbers a and b
Choose modulus m
Calculate a mod m
Calculate b mod m
Perform operation (add, sub, mul) on results
Take result mod m
Output result
Start with numbers a and b and modulus m, reduce a and b modulo m, perform arithmetic, then reduce the result modulo m.
