We have all been high schoolers once, and there was this topic about counting stuff:
combinatorics
.
Joey counting meaningless things (Friends)
Factorials
Binomial Coefficients, a.k.a. $\binom{n}{k}$
We saw that due to limitations in C++, we can only deal with small numbers to find the actual results. Remainders help us at this point!