<s>[INST] How many positive integers less than $1000$ divisible by $3$ with sum of digits divisible by $7$? 
How many positive integers less than $1000$ are divisible by $3$ with their sum of digits being divisible by $7$?

Well, I got Answer: $28$.
$a+b+c = 7k$  and $a,b,c$ are multiples of 3 so $a+b+c$ is a multiple of both $7$ and $3$.
Therefore $a+b+c=21$.
$(9-a)+(9-b)+(9-c)=6$
Then $^8C_2$. Can anyone explain why there is $9-a+9-b+9-c$?
If you have any other alternative method please explain?
 [/INST] The digit sum has to divisible by $3$ and by $7$, hence by $21$. This implies that we have to deduct a total of $6$ points from the maximal possible $9+9+9=27$. By stars and bars these $6$ points can be distributed in ${8\choose 2}=28$ ways onto the three decimal places.
</s>