write five digits numbers using $0,0,0,1,1,2,2,2,2,3,3,3,4,4$. It is given that we want to write five digits numbers using $0,0,0,1,1,2,2,2,2,3,3,3,4,4$.
How many ways are there to write it $?$
My thought In the first place, it seems cumbersome question a little bit , because i think that we should write them separately in terms of the leading term such that firstly i check over $1$ as leading term , then $2$ so on. However , this process is exhaustive and i hope to find  elegant approach for this question.

Here is a method which still requires a bit of work, but which is still more efficient then naive brute force.
Start with a simpler question:

For each $k=1,2,\dots,5$, how many $k$ digit numbers can you make using $3, 3, 4, 4, 4$?

With a little work, the answers are




k
1
2
3
4
5




# numberss with k digits using 3s and 4s
2
4
7
10
10




Next....

For each $k=1,2,\dots,5$, how many $k$ digit numbers can you make using $2,2,2,2,3,3,4,4,4$?

The key is that we can leverage or work in the previous step to make this one easier. Take the summation of all ways to place the $2$'s, times the number of ways to fill in the rest of the empty spaces with $3$'s and $4$'s, the latter of which can be looked up in the previous table. For example,
\begin{align}
\text{# $5$-digit nums with $2$'s, $3$'s and $4$'s} 
&= \binom{5}0\cdot \hspace{-1cm}
\overbrace{10}^\text{# 5 digit nums with 3,4}\hspace{-.1cm}
+ \binom{5}1\cdot \hspace{-1cm}\overbrace{10}^\text{# 4 digit nums with 3,4}\hspace{-1cm}
\\
&+ \binom{5}2\cdot \hspace{-1cm}\underbrace{7}_{\substack{\;\\\\\text{# 3 digit nums with 3,4}}}\hspace{-.1cm}
+ \binom{5}3\cdot \hspace{-1cm}\underbrace{4}_\text{# 2 digit nums with 3,4}\hspace{-.1cm}
\\&+ \binom{5}4\cdot \hspace{-1cm}\underbrace{2}_{\substack{\;\\\\\text{# 1 digit nums with 3,4}}}\hspace{-1cm}
\hspace{1.5cm}=\boxed{180}
\end{align}
You then have to do the same for the $1,2,\dots,4$ digit numbers, giving another row to the table. Then, use that row to calculate the number of numbers where you can use digits $1$ to $4$.




k
0
1
2
3
4
5




# numbers with k digits using 3s and 4s
1
2
4
7
10
10


# numbers with k digits using 2, 3, and 4
1
3
9
26
71
180


# numbers with k digits using 1, 2, 3 and 4
1
4
16
62
229
795




Finally, the number of five digit numbers using all available digits is found by summing over all ways to place the zeroes, times the number of ways to fill what remains with $1$ to $4$, which is in the last row of the table:
$$
\binom{4}0\cdot 795+\binom{4}1\cdot 229+\binom{4}2\cdot 62+\binom{4}3\cdot 16=\boxed{2147}
$$
