6. How many five-digit numbers have all different digits, and the sum of the digits in the units and tens place equal to 5?
6. How many five-digit numbers have all different digits, and the sum of the units and tens digits is equal to 5?

## Solution.

Let $\overline{a b c d e}$ be a five-digit number with digits $a, b, c, d$, and $e$.

The digits $d$ and $e$ can be chosen in 6 ways (possibilities: 5 and 0, 0 and 5, 4 and 1, 1 and 4, 3 and 2, 2 and 3).

After that, the remaining digits can be chosen as follows:

a) $\overline{a b c 05}$ or $\overline{a b c 50}$

The digit $a$ can be chosen in 8 ways (possibilities: 1, 2, 3, 4, 6, 7, 8, and 9). 1 POINT The digits $b$ and $c$ can be chosen in 7 and 6 ways, respectively (10 digits excluding 0, 5, and digit $a$ or $a$ and $b$).

The total number of five-digit numbers of this form is $2 \cdot 8 \cdot 7 \cdot 6 = 672$. 1 POINT

b) $\overline{a b c 14}$ or $\overline{a b c 41}$

The digit $a$ can be chosen in 7 ways (possibilities: 2, 3, 5, 6, 7, 8, and 9). 1 POINT The digits $b$ and $c$ can be chosen in 7 and 6 ways, respectively (10 digits excluding 1, 4, and digit $a$ or $a$ and $b$).

The total number of five-digit numbers of this form is $2 \cdot 7 \cdot 7 \cdot 6 = 588$. 1 POINT

c) $\overline{a b c 23}$ or $\overline{a b c 32}$

The digits $a, b$, and $c$ are chosen in the same way as in b).

The digit $a$ can be chosen in 7 ways (possibilities: 1, 4, 5, 6, 7, 8, and 9).

The digits $b$ and $c$ can be chosen in 7 and 6 ways, respectively (10 digits excluding 2, 3, and digit $a$ or $a$ and $b$).

The total number of five-digit numbers of this form is $2 \cdot 7 \cdot 7 \cdot 6 = 588$. 1 POINT

The total number of five-digit numbers with the desired property is $672 + 588 + 588 = 1848$.