20 types of candy available. How many ways can you put exactly 2 types of candy in a box with 10 spaces? I think first you find the number of ways to choose your $2$ types via combination, and then putting them in the box is just with replacement, $n^k$. This will also count where all $10$ are the same type though, so you have to subtract those out. Is this the correct thought process? 
Solution ideas are $\binom{20}{2}(2^{10} - 2)$ and $\binom{20}{2}(2^{10})-20$
 A: Assuming that only one candy can be put in each of the 10 spaces and that all 10 spaces must be occupied.
Also assuming that each of the 10 spaces are distinguishable. That is, placing 2 candies of the same type, one in space 1 and another in space 3 is different from placing one in space 4 and another in space 5.
And also assuming that the candies of the same type are indistinguishable.
Firstly, the 2 types of candy to fill up the box can be chosen in $\binom{20}{2}$ different ways.
Secondly, if $i$ candies of the first type are put in the 10 spaces where $1\leq i\leq 9$ (candies of the second type occupy the remaining spaces), then the box can be filled up in $\sum_{i=1}^{i=9}{\binom{10}{i}}=2^{10}-2$ ways.
So, the total number of ways to do this is $\binom{20}{2}*(2^{10}-2)$
A: First pick your two types of candy. You have $20 \cdot 19$ choices for that.
Then pick which type will go in the first space. $2$ choices. Then the second space. $2$ choices. And so on...
In all, you have $20 \cdot 19 \cdot 2^{10}$ ways to do this. Then since you say exactly two types of candy, we have to remove the two choices which consist entirely of one type of candy. So the final answer is:
$$N = 20 \cdot 19 \cdot 2^{10} - 2$$
