Non-Negative Integer Solutions with Upper Restrictions
## Formula
For:
$$x_1+x_2+\cdots+x_n=r$$
with:
$$0\le x_i\le m$$
the number of solutions can be found using inclusion-exclusion:
$$\sum_{k=0}^{\lfloor r/(m+1)\rfloor}(-1)^k{}^nC_k{}^{r-k(m+1)+n-1}C_{n-1}$$
## Usage
- Used when identical objects are distributed with a maximum limit on each recipient.