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?
Ans : 9,6.4
Sol: looking for a triplet x,y,z such that <br>
(x^2+y^2+z^2)/( x+y+z)=7 : constrained by problem's conditions.
Check: 9*9+6*6+4*4=81+36+16=133 133/19=7