Task 2. Find the number of all three-digit numbers that are divisible by 15 and whose sum of digits is less than or equal to 9.
Solution. From the condition in the problem, it follows that 3 is a divisor of $\overline{a b c}$ and 5 is a divisor of $\overline{a b c}$, meaning 3 is a divisor of $a+b+c$ and $c \in\{0,5\}$. From the second condition $a+b+c \leq 9$, we find that we are looking for three-digit numbers that end in 0 or 5, and the sum of their digits is 3, 6, or 9. If $c=0$, we get the following numbers: $120,210,300,150,510,240,420,330,600$, $180,810,270,720,360,630,450,540$ and 900. If $c=5$, we get the numbers: $105,135,225,315$ and 405. Therefore, a total of 23 numbers satisfy the conditions in the problem.