Question 1187542
.
Aling Maria has a candy stall in the market. 
One candy cost 5 cents each, the second cost 20 cents each and the 3rd cost 30 cents each. 
In her absence due to personal necessity an honest buyer picked a total of 
20 pcs. of candies costing 5 cents, 20 cents and 30 cents in the stall and leave 2 pesos for their exact cost. 
How many each candy of 5 cents, 20 cents, and 30 cents the honest buyer picked?
~~~~~~~~~~~~~~~~


<pre>
Let x be the number of 5-cent candies; 

    y be the number of 20-cent candies,

and z be the number of 30-cent candies.


As you read the problem, you can write these two equations


     x +   y +   z =  20      (pieces of candies)

    5x + 20y + 30z = 200      (cents, which is 2 pesos)


To simplify, divide all the terms in the second equation by 5.  You will get these two equations


     x +  y +  z = 20         (1)

     x + 4y + 6z = 40         (2)


Now subtract equation (1) from equation (2).  You will get

         3y + 5z = 20.


You should find the solutions to this equation in integer positive numbers, according to the problem's meaning.


Using this additional restrain, you have ONLY ONE unique solution  z = 1,  y = 5  (simply by "trial and error" method 
which is VERY EASY in this case).


Then  from equation (1), you get  x = 20 - 1 - 5 = 14.


<U>ANSWER</U>.  14 5-cent candies;  5 20-cent candies  and  1 30-cent candy.


<U>CHECK</U>.   14*5 + 5*20 + 1*30 = 70 + 100 + 30 = 200 cents = 2 pesos, the total cost.   ! Correct !
</pre>

Solved.


-----------------


Usually &nbsp;(and as a rule), &nbsp;three unknowns require three equations, &nbsp;in order for the problem had a unique solution.


But this problem demonstrates an exclusive case.


The problem gives only &nbsp;2 &nbsp;equations for &nbsp;3 &nbsp;unknowns, &nbsp;but the additional restrain

that the solution should be in integer positive numbers provides the &nbsp;UNIQUE &nbsp;answer (!)


So, &nbsp;this restrain works as a replacement to third equation (which absents (!) )