5. How many four-digit numbers exist that have the following properties: all digits of the number are even; the number is divisible by four, if the last digit is erased, the resulting three-digit number is not divisible by four?
Answer: 120. Solution. The last digit of the number must be divisible by 4 (that is, it can be 0, 4 or 8), and the second to last - not (2 or 6). In addition, the first digit is not zero. Therefore, we get $4 \cdot 5 \cdot 2 \cdot 3=120$ variants.