3. Find the number of five-digit numbers in which all digits are different, the first digit is divisible by 2, and the sum of the first and last digits is divisible by 3.
Solution. The first digit can be 2, 4, 6, or 8. If the first is 2, the last can be $1, 4, 7$; if the first is 4, the last can be $2, 5, 8$; if the first is 6, the last can be $0, 3, (6$ does not fit), 9; if the first is 8, the last can be $1, 4, 7$. In total, there are $3+3+3+3=13$ options for the first and last digits. For each of these options, there are $8 \cdot 7 \cdot 6=336$ ways to choose the two middle digits. In total, $336 \cdot 12=4032$ ways.

Criteria. The same as in 5.4.