Using only the digits $2$, $3$ and $9$, how many six digit numbers can be formed which are divisible by $6$?
My attempt :
To be divisible by $6$, the number has to be divisible by $2$ and $3$. Thus, the one's digit has to be $2$ only. Now we need to arrange $2$, $3$, $9$ in the left over five digits' places such that their sum is $3z-2$, where $z \in \mathbb{Z}^+$. But I am not able to proceed further. Can someone help?