3. Gabriele notices that the number 2022 is written with 3 identical digits and one fourth digit different from the other 3. How many natural numbers of 4 digits are there in total that are written with 3 identical digits and one fourth digit different from the other 3?
(A) 324
(B) 315
(C) 243
(D) 216
(E) 288
Problem 3. The correct answer is (A).

Consider two possible cases.

- The first digit is the one different from the others. In this case, the first digit can be chosen in 9 ways (it cannot be 0), and the three identical digits can be chosen in 9 ways (the digit chosen previously cannot be reused, but 0 can be used): the possibilities are therefore $9 \cdot 9=81$.
- The first digit is not the one different from the others. In this case, the first digit can be chosen in 9 ways (it cannot be 0); the digit different from the others can be chosen in 9 ways and can be placed in 3 different positions: the possibilities are therefore $9 \cdot 9 \cdot 3=243$.

In total, there are therefore $81+243=324$ possibilities.