Two different types of marbles in a box. Two different types of marbles in a box: blue and red. Each of blue marbles is $19$ grams, and each of red marbles is $17$ grams. The total weights of all marbles are $2017$ grams. How many total number of both marbles are possible?
This is from a timed competition, fastest answers are better. I really don't know where to start with this. I just plugged this into Excel and got $107,109,111,113,115,117$. Any help?
 A: In a timed competition, I would concentrate on multiples of the $19$ grams. Try to get close to $2017$ and exceed it by an even value. If we can exceed it by, say, $6$, then we can trade $3$ of these blue marbles for red marbles.
So just very quickly:
$1900 + 190 = 2090$ subtract a $19$ to get $2071$. This used $100+10-1 = 109$ blue marbles.
But we are $2071-2017$ over the target, which is $54g$ over the target, so trading $27$ blue marbles for red ones will be the answer.
$109-27 = 82$ blue and $27$ red  (is one possible answer, of many)
A: I would start by noticing that an average marble weighs $18$ grams.  If all my marbles were average it would take $\frac {2017}{18}=112\frac 1{18}$ marbles.  I can get there with $111$ average marbles and one blue one.  Unfortunately I can't just trade two average for one blue and one red because of the odd number of average ones.  But I can trade $110$ average marbles for $55$ red and $55$ blue ones, giving a solution with $55$ red, $1$ average, and $56$ blue.  If I change $9$ marbles from red to blue I use up the $18$ grams of the average marble, so my first solution is $46$ red, $65$ blue for a total of $111$ marbles.  Now note I can keep the weight the same trading $19$ red marbles for $17$ blue ones and save two marbles.  I can do that twice, going down to $107$ marbles, or three times the other direction going up to $117$ marbles.  There is a solution for any odd number $107$ to $117$, a total of six.
