In the planet Realmnoir, shukel is the predominant unit of currency.
Sabrina is a little girl living in Realmnoir who loves sweets. When a candy maker came into town, she was one of his first customers. She purchased three different kinds of candy: bonbons, sweetles and chocos, buying as many pieces of each kind of candy as its price per piece in shukels.
Sabrina paid an average of 7 shukels for each piece of candy, but each of the three kinds cost a different positive integer amount of shukels per piece. Bonbons cost the most, sweetles cost less, and chocos cost the least per piece. All of the candies cost at least 4 shukels per piece. Compared to bonbons, one of the other two kinds of candy costs 3 shukels less per piece. Sabrina spent less than 150 shukels.
How many of each kind did she buy?
(In reply to
solution-spoiler by Ady TZIDON)
Also, looking at each square mod 7 and finding a triplet that will add to 7(0) mod 7.
4² = 16 = 2 % 7
5² = 25 = 4 % 7
6² = 36 = 1 % 7
7² = 49 = 0 % 7
8² = 64 = 1 % 7
9² = 81 = 4 % 7
From this we can see that we need one candy to cost 4 shukels, as we need a 1, 2, and 4 to make the sum of the values divisible by 7. Now we need a 1 and a 4, leaving two combinations such that the most expensive (bonbons) will cost 3 shukels more than one of the others, (4, 5, 8) and (4, 6, 9).
While that leaves us two potential solutions, looking at the first, the squares sum to 105 (16 + 25 + 64 = 105), 7 * (4 + 5 + 8) does not equal 105 shukels, thus these values don't form a solution. Checking our last possible solution, 16 + 36 + 81 = 133, 7 * (4 + 6 + 9) = 133. So the second solution is the one we want.
She bought: 4 chocos, 6 sweetles, and 9 bonbons.
|
Posted by Justin
on 2010-02-23 13:18:01 |