5. How many natural numbers less than 100000 are divisible by 4 and in whose decimal representation only the digits $0,1,2,3$ and 5 participate? (Digits can repeat and not all of them need to appear in the representation of such a number.)

## Second Grade - B category
5. There are no single-digit numbers. Possible two-digit numbers are $12, 20, 32$, and $52$, i.e., there are 4 of them. Three-digit numbers must have a two-digit ending divisible by 4, i.e., the two-digit ending must be one of the numbers just listed or $00$; thus, there are 5 possibilities for the two-digit ending and 4 possibilities for the hundreds digit ($1, 2, 3$, or $5$, but not $0$), so there are $5 \cdot 4 = 20$ three-digit numbers. Similarly, there are $5 \cdot 5 \cdot 4 = 100$ four-digit numbers (5 possibilities for the two-digit ending, 5 possibilities for the hundreds digit, and 4 possibilities for the thousands digit), and $5 \cdot 5 \cdot 5 \cdot 4 = 500$ five-digit numbers. Since the numbers under consideration can be at most five-digit, there are a total of $4 + 20 + 100 + 500 = 624$.

## Second Grade - B Category