A shopping mall wants to buy 50 pieces of a and B commodities. The price of a commodity is 35 yuan per piece, and the profit rate is 20%. The price of B commodity is 20 yuan per piece, and the profit rate is 15%. The total profit is 278 yuan. How many pieces of a and B commodities do you buy?

A shopping mall wants to buy 50 pieces of a and B commodities. The price of a commodity is 35 yuan per piece, and the profit rate is 20%. The price of B commodity is 20 yuan per piece, and the profit rate is 15%. The total profit is 278 yuan. How many pieces of a and B commodities do you buy?

Let a and B buy X and Y pieces respectively. According to the meaning of the question, we get: x + y = 5020% × 35x + 15% × 20Y = 278. The solution is: x = 32y = 18. Answer: A and B buy 32 and 18 pieces respectively