I plan on investing shares each worth $23, $27, $45 and $21. If I buy at least one of each share, and spend exactly $215, how many shares did I buy altogether?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let a, b, c and d be thr number of $21, $45, $27 and $23 respectively. Therefore 21a + 45b + 27c + 23d = 215. Therefore d = \frac {215 - 3 (7a+15b+9c)}{23}. Let (7a+15b+9c)=v, we get d= \frac {215-3v}{23}. Ie (215-3v) =23,46,69,92.... through a bit of trial and error, we get 215-3v=23 or 92. When its 92, v=41, ie 7a+15b+9c=41 and making a the subject a = frac{41-3 (5b+3c)}{7}. Again let (5b+3c)=w therefore a= frac {41-3w}{7} since w cannot equal 2 as I bought each share, the next possibility is when w= 9. However there is no Integer solution for 5a+3b=14 therefore v= 41 doesnt work. Therefore when v= 64, 7a = 64-3y where y = 5b+3c. For the reasons above when y=5 and 12 integer solutions dont exist. However when y=19, b=2, c=3, d=1 and a=1, ie a+b+c+d= 2+3+1+1= 7. You can also check that these values satisfy.