Question 1209265
<font color=black size=3>
There's probably a much more efficient way to do this, but here's my approach.


x = number of $14 pads
y = number of $5 pads
z = number of 50 cent pads
The goal is to evaluate z-y


54 pads were sold
x+y+z = 54
which can be rearranged to
z = 54-x-y


14x = money from just the $14 pads
5y = money from just the $5 pads
0.5z = money from just the 50 cent pads
These must total to the $54 mentioned.


14x+5y+0.5z = 54
14x+5y+0.5*(54-x-y) = 54
14x+5y+27-0.5x-0.5y = 54
13.5x+4.5y+27 = 54
13.5x+4.5y = 54-27
13.5x+4.5y = 27
135x+45y = 270
45y = -135x+270
y = (-135x+270)/45
y = (-135x)/45+270/45
y = -3x+6


If x and y are positive integers, then the only possibility is when x = 1
If x = 2 or larger, then y = 0 or smaller.
I'll assume that at least one of each item was sold.


If x = 1 then y = -3x+6 = -3*1+6 = 3
and z = 54-x-y = 54-1-3 = 50


x = 1 copy of the $14 pad of paper was sold
y = 3 copies of the $5 pad of paper were sold
z = 50 copies of the 50 cent pad of paper were sold


Check:
x+y+z = 1+3+50 = 54
and
14x+5y+0.50z = 14*1+5*3+0.50*50 = 54
Both conditions are confirmed.


The final answer is therefore z-y = 50-3 = <font color=red>47</font>
</font>