I was given the next question: How many $5$ digit numbers are there that have $3$ as one of their digits and are also divided by $3$?
I'd like to hear your thoughts on my answer or suggest a better one:
My answer would be finding the number of all of the possible $5$ digit numbers and then reduce it by $(B+C+D)$ whereas:
$B$= all of the possible options for a $5$ digit number which is divided by $3$ but does not contain the digit $3$ in it other than the last digit.
$C$=all of the possible options for a $5$ digit number which is not divided by $3$ but does contain the digit $3$ in it.
$D$=all of the possible options for a $5$ digit number which is not divided by $3$ and does not contain the digit $3$ in it.