PSLE Xylia bought some candy canes and gave half of it to Cody. Cody bought some sweets and gave half of it to Xylia. Xylia ate 8 sweets and Cody ate 20 candy canes. The ratio of Xylia's sweets to candy canes became 1 : 6 and the ratio of Cody's sweets to candy canes became 1 : 2. How many candy canes did Xylia buy?
|
Xylia |
Cody |
|
Sweets |
Candy canes |
Sweets |
Candy canes |
Before |
1 u + 8 |
6 u |
1 p |
2 p + 20 |
Change |
- 8 |
|
|
- 20 |
After |
1 u |
6 u |
1 p |
2 p |
After Xylia gave half of the candy canes to Cody and Cody gave half of his sweets to Xylia, Cody and Xylia had same number of sweets and candy canes before each ate some.
6 u = 2 p + 20
6 u - 20 =
2 p --- (1)
1 u + 8 = 1 p --- (2)
Make p the same.
(2)
x2
2 u + 16 =
2 p --- (3)
(1) = (3)
6 u - 20 = 2 u + 16
6 u - 2 u = 16 + 20
4 u = 36
1 u = 36 ÷ 4 = 9
Number of candy canes that Xylia bought
= 2 x 6 u
= 12 u
= 12 x 9
= 108
Answer(s): 108