Maggie has a box of 300 colored blocks.The box has a equal number of green and blue blocks and an equal number of red and yellow blocks.If Maggie arranged all of the green blocks in stacks of 10 and all of the blue blocks in stacks of 7,how many yellow blocks are in the box?

2 answers

clearly, if there are x stacks of green & blue, and y of red & yellow, then

20x+14y = 300
10x+7y = 150
y = (150-10x)/7
y = 10(15-x)/7

Since there must be an integer number of blocks, and 7 does not divide 10, it must divide 15-x
So, 15-x = 7 or 14
and y = 10 or 20

So, there may be 70 yellow and red, and 80 green & blue

or 140 yellow and red, and 10 green & blue
70