40. How many even four-digit numbers are there that do not contain the digits 5 and 6?
40. The first digit can be chosen in seven ways (we cannot take 0, 5, and 6), the second and third digits can each be chosen in eight ways, and the last digit, which must be even, can be chosen in four ways (we cannot take 6). In total, we get $7 \cdot 8 \cdot 8 \cdot 4 = 1792$ numbers.