## 6. Even and Odd

How many three-digit natural numbers have at least one even digit and at least one odd digit? Zero is an even digit.

Result: $\quad 675$
## First solution.

Let $p$ be an even digit, and $n$ be an odd digit of a three-digit number. Then $p \in \{0,2,4,6,8\}$ and $n \in \{1,3,5,7,9\}$. Since at least one digit must be even and at least one digit must be odd, the desired three-digit numbers are of the form $\overline{p n n}, \overline{n p n}, \overline{n n p}, \overline{p p n}, \overline{p n p}, \overline{n p p}$.

Numbers of the form $\overline{p n n}$ are $4 \cdot 5 \cdot 5=100$ (the hundreds digit is different from zero).

Numbers of the form $\overline{n p n}$ are $5 \cdot 5 \cdot 5=125$.

Numbers of the form $\overline{n n p}$ are $5 \cdot 5 \cdot 5=125$.

Numbers of the form $\overline{p p n}$ are $4 \cdot 5 \cdot 5=100$ (the hundreds digit is different from zero).

Numbers of the form $\overline{p n p}$ are $4 \cdot 5 \cdot 5=100$ (the hundreds digit is different from zero).

Numbers of the form $\overline{n p p}$ are $5 \cdot 5 \cdot 5=125$.

There are $100+125+125+100+100+125=675$ three-digit numbers where at least one digit is even and at least one digit is odd.