An ATM machine distributes £10 and £20 notes. If you ask for £100, what possible combinations of £10 and £20 notes can you get?
We formulate the problem as follows, with $x$ the number of £10 notes, and $y$ £20 notes.
$$ 10x + 20y = 100 $$
The $\gcd(20,10)=10$ which divides 100, so the equation has integer solutions.
By inspection a solution is $x_0 = 10, y_0 = 0$. The general solution is therefore
$$ x = 10 + 2t \quad y = -t$ $$
However, the number of notes $x,y$ must be non-negative, so we have the following inequalities
$$ 10 + 2t \ge 0 \quad \iff \quad t \ge -5 $$
$$ -t \ge 0 \quad \iff \quad 0 \ge t $$
That is
$$ -5 \le t \le 0 $$
The values of $t$ which generate non-negative $x,y$ are -5, -4, -3, -2, -1 and 0.
The possible combinations of $x$, £10 notes, and $y$, £20 notes are
| t | x=10+2t | y=-t | 10x+20y |
| -5 | 0 | 5 | 100 |
| -4 | 2 | 4 | 100 |
| -3 | 4 | 3 | 100 |
| -2 | 6 | 2 | 100 |
| -1 | 8 | 1 | 100 |
| 0 | 10 | 0 | 100 |