A pair = 2 cubes
So if we need to ensure that at least one pair of each color has been removed, we want the worse-case scenario:
First we select red, then blue, then green (this is worse-case, because we haven't gotten a pair yet). Then we select one of the three colors (aha! one pair since all of the colors have already been selected) then we select another same color (this is worst-case because we haven't hit two pairs yet). Then we select another same color and another and another until we use up all of the red (this is worst-case because red has the most). We do that for 14 times (since there are 15 and the first red was already selected.) Now we move on to green (this is worst-case because green is the second most), we do that for 12 times (same logic). You get it. Now we select our last one which is blue (since the others are already all used up). And now you're finished. Hopefully, you can add up those cubes.
10 digit numbers go something like this: _ _ _ _ _ _ _ _ _ _
If number 2 is in the first place, it's kind of set so you basically only need to find 9 digit numbers now: _ _ _ _ _ _ _ _ _
If repition is not allowed, the first digit has 9 (no 0) choices the second also has 9 (because any number except the first chosen) the third has 8, and so on. That's basically going to be 9*9! (without the 1 but anything times 1 does nothing)
Try figuring that out!
the point is probably to help you solve it, so if you can dof it another way, that would work as well as long as you get the right answer
but this is the addition method:
1st: Line up the variables in both equation, x above x, y above y, = above =, constant above constant. 2nd: (Optional) Multiply one or both equations so the coefficients of one variable are opposites. 3rd: Add the equations to eliminate one variable. 4th: Solve.