Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Let's make T the total number of boxes on the table. Large(L), Medium(M) and Small(S):
- L + M + S = T (the total we need to find).
- For each size box, large, medium and small, we have two states - empty and full. Make them Le/Lf, Me/Mf and Se/Sf respectively.
- We can say right now that there are no full Small boxes, they are all empty:
- Sf = 0 --> Se = S.
- We know that we have 11 large boxes in total:
- Le + Lf = 11
- The total number of Medium boxes is Me + Mf, which can also be expressed as the number of Large boxes that are full, times 8 (since we put 8 medium in each):
- M = Me + Mf = 8 * Lf
- Similarly, the total number of Small boxes can be expressed as the number of full Mediums, times 8:
- S = Mf * 8
- And we know from the spec that the total number of all empty boxes (Large, Medium and all the Small ones) is 102.
- Awesome, we now have an equation:
- Le + Me + S = 102, let's substitute:
- { Le = 11 - Lf, }
- { Me = M - Mf = 8 * Lf - Mf,} --> (11 - Lf) + (8 * Lf - Mf) + 8 * Mf = 102
- { S = 8 * Mf }
- Simplify:
- 7 * Lf + 7 * Mf = 102 - 11 --> 7 * (Lf + Mf) = 91
- And voila,
- Lf + Mf = 13.
- In other words, *the sum of all full Large and Medium boxes is 13*
- And we know that ALL small boxes are empty, which means
- *the Total number of all boxes is the sum of FULL Large and FULL Medium boxes plus all the empty ones*.
- We just found the sum of all full ones, and we were given the number of empties. So there we have it folks:
- T = (Mf + Lf) + 102 = 13 + 102 = 115.
- The end.
Advertisement
Add Comment
Please, Sign In to add comment