How to factor integers in a linear equation I saw the following riddle:

You've been giving $\$$100 dollars to buy 100 items. Item A costs $\$$0.56, Item B
      costs $\$$2.26, and item C costs $\$$0.92.
      How can you spend all of the money on the 100 items?

Now I know to do the following:
.56A + 2.26B + .92C = 100
A + B + C = 100

Now doing the following:
  .56A + 2.26B + .92C = 100
- .56A -  .56B - .56C = -56
-----------------------------
         1.70B + .36C = 44 // Thanks Arturo Magidin

Now that leaves us with 2 unknowns but I need another equation to solve this. I also know that A B and C are all integers. How do I factor that in?
 A: As Arturo mentioned in his comment, 
this type of equations is called linear Diophantine equations, nice explanation how they can be solved is given in answers to this
this question.
In your case, you want to find integers $b$ and $c$ such that $170b+36c=4400$, i.e.
$$85b+18c=2200.$$
As you can check at wolframalpha (and if you learn how to solve linear Diophantine equations, you can try to get the result yourself), all integer solutions are
$$\begin{align*}
b&=18n+10;\\
c&=-85n+75.
\end{align*}
$$
Since you want $b,c\ge 0$, the only possible value is $n=0$. Thus you get $b=10$, $c=75$ and $a=100-b-c=15$.
A: Given the tags [linear-algebra] and [matrices], this is what you need to do:


*

*Solve the problem using matrices in the usual way; since you have two equations in three unknowns, you will have infinitely many solutions. Express them in terms of a parameter.

*Find a value of the parameter that makes all variables into positive integers.
Here we have:
$$\begin{align*}
56A + 226B + 92C &= 10000\\
A + B + C &= 100
\end{align*}$$
so we have:
$$\begin{align*}
\left(\begin{array}{rrr|r}
56 & 226 & 92 & 10000\\
1 & 1 & 1 & 100
\end{array}\right) &\to
\left(\begin{array}{rrr|r}
1 & 1 & 1 & 100\\
28 & 113 & 46 & 5000
\end{array}\right)
&&\to
\left(\begin{array}{rrr|r}
1 & 1 & 1 & 100\\
0 & 85 & 18 & 2200
\end{array}\right)\\
&\to
\left(\begin{array}{rrr|r}
1 & 1 & 1 & 100\\
0 & 1 & \frac{18}{85} & \frac{440}{17}
\end{array}\right)
&&\to
\left(\begin{array}{rrr|r}
1 & 0 & \frac{67}{85} & \frac{1260}{17}\\
0 & 1 & \frac{18}{85} & \frac{440}{17}
\end{array}\right).
\end{align*}$$
So the solutions are:
$$\begin{align*}
A &= \frac{1260}{17} - \frac{67}{85}t\\
B &= \frac{440}{17} - \frac{18}{85}t\\
C&= t
\end{align*}$$
Now find the values of $t$ for which all three quantities are positive integers. 
A: HINT $\rm\ \ \ 170\ b + 36\ c\ =\ 4400\ \iff\ 85\ b + 18\ c\ =\ 2200\:,\ $ therefore
$$\rm mod\ 18\!:\ \ b\ \equiv\ \frac{2200}{85}\ \equiv\ \frac{440}{17}\ \equiv\ \frac{8}{-1}\ \equiv\ -8\ \equiv\ 10 $$
Thus $\rm\ \ b\ =\ 10 + 18\ n\ \ $ and  $\rm\ \ c\ = \ \dfrac{2200 - 85\ (10 + 18\ n))}{18}\ =\ 75 - 85\ n $  
Now $\rm\ b \ge 0\ \Rightarrow\ n\: \ge\: 0\ $ and $\rm\ c\ge 0\ \Rightarrow\ n\:\le\:0\:.\:$ Thus $\rm\ n\:=\:0\ $ so $\rm\ b,\:c\ =\ \ldots\ $ hence $\rm\ a\ =\ \ldots$
