Q. Let be a set of distinct elements. The number of triplets of the elements of in which at least two coordinates are equal to

 1736  193 Permutations and Combinations Report Error

Solution:

Total number of triplets without restriction
The number of triplets with all different coordinates
The required number of triplets