How many different three-digit numbers contain both the digit $2$ and the digit $6$? 
How many different three-digit numbers contain both the digit $2$ and the digit $6$? 

There are six possible permutations: $$
\overline{26x},\ \overline{62x},\ \overline{2x6},\ \overline{6x2},\ \overline{x26},\ \overline{x62}.
$$
In the first four groups $x$ can be any number in $[0,9]$, in the two last groups $x$ can be any number in range $[1,9]$. So
$$
4 \times 10 + 2 \times 9 = 58.
$$
However, the right answer is $52$. Could you, please, point out the mistake in the reasoning? 

You should also take into account the repetition of a number. The following numbers are repeated:
$226({x26\text{ and }2x6})$
$262(26x\text{ and }x62)$
$266(26x\text{ and }2x6)$
$622(62x\text{ and }6x2)$
$626(62x\text{ and }x26)$
$662(6x2\text{ and }x62)$
So after subtracting the number of repeated numbers (i.e. $6$) from $58$, we get $52$.
A genuine approach to this problem is given in the other answer of Manthanein.
