The correct option is
D none of these
Consider first the number of 5-digit numbers divisible by 3. The smallest is
10002=3334×3, the largest is
99999=33333×3, so there are 30000 such numbers.
Now consider the numbers that do not contain the digit 6. There are 8 choices for the 1st digit, 9 choices for each of the 2nd, 3rd and 4th digits.
If the total of the first 4 digits is a multiple of 3, then the last digit must be 0, 3 or 9.
If it gives a remainder 1 when divided by 3, then the last digit must be 2, 5 or 8.
If it gives a remainder 2 when divided by 3, then the last digit must be 1, 4 or 7.
So in all cases there are 3 choices for the last digit. Hence the total number is
8×93×3=17496.
So the total no. of 5 digit numbers which are divisible by 3 and contains a 6 is 12504.