Xandra has some candy canes and lollipops. If she packs a candy cane and a lollipop in each bag, there will be 17 lollipops left. If she packs 3 candy canes and 4 lollipops in each bag, there will be 30 candy canes left. How many candy canes and lollipops does she have in all?
|
Case 1 |
Case 2 |
|
Candy Canes |
Lollipops |
Candy Canes |
Lollipops |
Before |
1 u |
1 u + 17 |
3 p + 30 |
4 p |
Change |
- 1 u |
- 1 u |
- 3 p |
- 4 p |
After |
0 |
17 |
30 |
0 |
The number of candy canes at first is the same for Case 1 and 2.
The number of lollipops at first is also the same for Case 1 and 2.
1 u = 3 p + 30 --- (1)
1 u + 17 = 4 p
1 u = 4 p - 17 --- (2)
(2) = (1)
4 p - 17 = 3 p + 30
4 p - 3 p = 30 + 17
1 p = 47
Total number of candy canes and lollipops
= (3 p + 30) + 4 p
= 7 p + 30
= 7 x 47 + 30
= 329 + 30
= 359
Answer(s): 359