# Moderate Algebra Solved QuestionAptitude Discussion

 Q. A small confectioner bought a certain number of pastries flavoured pineapple, mango and black-forest from the bakery, giving for each pastry as many rupees as there were pastry of that kind; altogether he bought 23 pastries and spent Rs 211; find the number of each kind of pastry that he bought, if mango pastry are cheaper than pineapple pastry and dearer than black-forest pastry.
 ✖ A. {10, 9, 4} ✔ B. {11, 9, 3} ✖ C. {10, 8, 5} ✖ D. {11, 8, 4}

Solution:
Option(B) is correct

Let the number of pineapple, mango and black-forest pastries be $p, m$ and $b$ respectively.

Given, $p+m+b=23$ -------- (i)

$p^2+m^2+b^2=211$ -------- (ii)

From equations (i) and (ii), we get:

$p =11, m =9$ and $m =3$

## (1) Comment(s)

ABHIJEET
()

we can also get the answers just by looking at the answer options..

since pxp + mxm + bxb = 211

(deduction) there are 3 numbers whose square if added gives 211

working with option a.. the addition of square ends with 7 in its units place, so no need to go with this option

b ends with 1 , save it

c ends with 9 , leave it

d also ends with 1 but 0 in its units place.

So, we can go with b