2. Find the number of 5-digit numbers that contain at least one 6 and are divisible by 3.
2. Let the 5-digit number be $P_{1} P_{2} P_{3} P_{4} P_{5}$.
(1) $P_{5}$ is $6, P_{2}, P_{3}, P_{4}$ can be one of the ten digits $0,1,2, \cdots, 9$. When $P_{2}, P_{3}, P_{4}, P_{5}$ are determined, $P_{1}$ has only 3 possibilities. If $P_{2}+P_{3}+P_{4}+P_{5} \equiv 0(\bmod 3)$, then $P_{1}$ can be $3,6,9$. There are $3 \times 10^{3}=3000$ such numbers.
(2) $P_{4}=6, P_{5} \neq 6$, $P_{5}$ has 9 possibilities, $P_{2}, P_{3}$ have ten possibilities, and $P_{1}$ has three possibilities. There are $3 \times 9 \times 10^{2}=2700$ such numbers.
(3) $P_{3}=6, P_{4} \neq 6, P_{5} \neq 6$; there are $3 \times 9^{2} \times 10=2430$ such numbers.
(4) $P_{2}=6, P_{3} \neq 6, P_{4} \neq 6, P_{5} \neq 6$; there are $3 \times 9^{3}=2187$ such numbers.
(5) $P_{1}=6, P_{2} \neq 6, P_{3} \neq 6, P_{4} \neq 6, P_{5} \neq 6$; there are $3 \times 9^{3}=2187$ such numbers.
By the principle of addition, $N=3000+2700+2430+2187 \times 2=12504$.
Alternative solution: There are 90000 5-digit numbers, and 30000 of them are divisible by 3.
Then calculate the number of 5-digit numbers divisible by 3 that do not contain the digit 6. $P_{1}$ can take 8 digits, $P_{2}, P_{3}, P_{4}$ can take 9 digits, and $P_{5}$ can take 3 digits, making a total of $8 \times 9^{3} \times 3$ numbers. Therefore, the number of 5-digit numbers divisible by 3 and containing the digit 6 is $30000-8 \times 9^{3} \times 3=12504$.