Official Solution
Since, one child cannot have more than two brands of chocolates, therefore, one child can get a maximum of six chocolates.
When there are four winners, the winners can have the chocolates in the following possible way
Case I
One of them gets six chocolates and the other three get one each.
The one who gets six chocolates can be selected in 4C1 ways and he will get any two brands out of three in 3C2 ways.
The three chocolates of the same brand will be distributed among the other three in 3! ways.
Hence, the total number of ways = 4 × 3 × 6 = 72
Case II
One of them gets 5 chocolates, one of them gets 2 chocolates and the other two get 1 each.
Kid with 5 chocolates:
The one who gets five chocolates can be selected in 4C1 ways and he will get any two brands out of three in 3C2 ways.
After choosing the two brands (say A & B), he can get all three chocolates of one brand in 2 ways (i.e. either A or B). The other two chocolates can be chosen from the second brand in 3 ways. Thus, there are 4 × 3 × 2 × 3 = 36 ways
Kid with 2 chocolates:
This person can be chosen in 3 ways. Now, he can either get two chocolates from the same brand or from two different brands.
Thus, there are 6 × 3 = 18 ways
Kids with 1 chocolate each
The remaining chocolates can be distributed between the two remaining winners in 2 ways.
Therefore, total number of ways = 36 × 18 × 2 = 1296 ways.
Case III
Similarly for four chocolates the following combinations are possible:
a) 4 3 1 1
The number of ways = 4 × 3 × [{6 × 3(1 + ( 6 + 3))} + {1 × 9 × 3 (1 + 6)}] × 2 = 8856
b) 4 2 2 1
The number of ways = 4 × 3 × [{6 × 3(2 × 6 × 3 + (3 + 9))} + {9 × (9 + 9)}] = 12312
Since, the best of them can’t have less than 4 chocolates the above are the only cases applicable.
Hence, the total number of ways = 72 + 1296 + (8856 + 12312) = 22536.