math
posted by Sandra .
If paint is sold for $ 15 a can and $20 a can and they sell 320 dollars worth of paint, how many cans of paint do they sell? I know it takes 7 cans of paint at 20 equaling 140 and 12 cans at 15 equaling 180 but I', stumped at how to write the equation

Let x = 15$ paint

Number of $15 cans  x
number of $20 cans  y
15x + 20y = 320
divide by 5
3x + 4y = 64
we are looking at the equation of a straight line, where the solutions can only be integers, (can't buy a partial can of paint)
xintercept = 64/3 , x < 21
yintercept = 64/4 , y < 16
3x = 644y
x = (644y)/3
644y must be a multiple of 3
with y as an integer, 644y can only be
60 56 52 48 44 40 36 32 28 24 20 16 12 8 4
of those the only multiples of 3 are:
60 48 36 24 and 12
so, assuming they buy at least one of each can, possible solutions for (x,y) are
(20,1)
(16,4)
(12,7)  your answer
(8,10)
(4,13)