Problem (Combinatorics):
Let $T=17$. In ARMLovia, the unit of currency is the edwah. Janet's wallet contains bills in denominations of 20 and 80 edwahs. If the bills are worth an average of $2 T$ edwahs each, compute the smallest possible value of the bills in Janet's wallet.

Solution:
Let $x$ be the number of twenty-edwah bills and $y$ be the number of eighty-edwah bills. Then

$$
\begin{aligned}
\frac{20 x+80 y}{x+y} & =2 T \\
20 x+80 y & =2 T x+2 T y \\
(80-2 T) y & =(2 T-20) x
\end{aligned}
$$



In the case where $T=17$ (and hence $2 T=34$ ), this equation reduces to $46 y=14 x$, or $23 y=7 x$. Because 23 and 7 are relatively prime, $23 \mid x$ and $7 \mid y$. Therefore the pair that yields the smallest possible value is $(x, y)=(23,7)$. Then there are $23+7=30$ bills worth a total of $23 \cdot 20+7 \cdot 80=460+560=1020$ edwahs, and $1020 / 30=34$, as required. The answer is $\mathbf{1 0 2 0}$.

Consider the equation $\frac{20 x+80 y}{x+y}=2 T$ derived in the first solution. The identity $\frac{20 x+80 y}{x+y}=20+\frac{60 y}{x+y}$ yields the following:

$$
\begin{aligned}
\frac{60 y}{x+y} & =2 T-20 \\
\frac{30 y}{x+y} & =T-10 \\
x+y & =\frac{30 y}{T-10} .
\end{aligned}
$$

For the smallest value of $x+y$, both $x+y$ and $y$ will be relatively prime. Thus the smallest value of $x+y$ is $\frac{30}{\operatorname{gcd}(T-10,30)}$, which occurs when $y=\frac{T-10}{\operatorname{gcd}(T-10,30)}$. Substituting $T=17$, the numbers $T-10=7$ and 30 are relatively prime, so $y=7$ and $x=23$, for a total of $\mathbf{1 0 2 0}$ edwahs.

Final answer: 1020