This is LaTeX code:
[latex]
3!{9 \choose 3}+3!{9 \choose 2}+{9\choose 1}=729.
[/latex]