Problem 4. Masha has seven different dolls, which she arranges in six different doll houses so that each house has at least one doll. In how many ways can Masha do this? It is important which doll ends up in which house. It does not matter how the dolls are seated in the house where there are two of them.
Answer: 15120.

Solution. In each such seating arrangement, in one of the cabins there will be two dolls, and in the other cabins - one each. First, we choose which two dolls will sit in one cabin. This can be done in $7 \cdot 6: 2=21$ ways. Then we choose which cabin to seat these two dolls in. This can be done in 6 ways. Finally, we choose how to seat the remaining 5 dolls in the remaining 5 cabins. This can be done in $5!=5 \cdot 4 \cdot 3 \cdot 2 \cdot 1=120$ ways. Therefore, the number of seating arrangements is $21 \cdot 6 \cdot 120=15120$.