One of many ways is dividing n by 2 repeatedly.
$$n! = 1 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot 6 \cdot 7 \cdot 8 \cdot 9 \cdot \ldots \cdot n$$
We define \$\mathrm{factodd}(n)\$ as the product of odd numbers 1∙3∙5∙…∙n:
$$\begin{align}
n! &= \mathrm{factodd}(n) \cdot 2^{\frac{n}{2}}\left(1 \cdot 2 \cdot 3 \cdot 4 \cdot \ldots \cdot \frac{n}{2}\right) \\
&= \mathrm{factodd}(n) \cdot 2^{\frac{n}{2}}\left(\mathrm{factodd}\left(\frac{n}{2}\right) \cdot 2^{\frac{n}{4}} \cdot \left(1 \cdot 2 \cdot \ldots \cdot \frac{n}{4}\right)\right) \\
&\ \vdots \\
&= \mathrm{factodd}(n) \cdot 2^{\frac{n}{2}}\left(\mathrm{factodd}\left(\frac{n}{2}\right) \cdot 2^{\frac{n}{4}}\left(\mathrm{factodd}\left(\frac{n}{4}\right) \cdot 2^{\frac{n}{8}}\left(\mathrm{factodd}\left(\frac{n}{8}\right) \cdot \ldots \right)\right)\right) \\
&= 2^{\frac{n}{2}+\frac{n}{4}+...+\frac{n}{2^k}} \cdot \mathrm{factodd}(n) \cdot \mathrm{factodd}\left(\frac{n}{2}\right) \cdot \mathrm{factodd}\left(\frac{n}{2^2}\right) \cdot \mathrm{factodd}\left(\frac{n}{2^3}\right) \cdot \ldots \cdot \mathrm{factodd}\left(\frac{n}{2^k}\right)
\end{align}$$
where \$k\$ is the nearest biggest exponent of 2 which satisfies \$\dfrac{n}{2^k}=1\$, means \$k=log_{2}{n}\$
Notice that you don't have to calculate factodd(k) each time — just multiply the square of the factorial of common first n/2 numbers of factodd(n) * factodd(n/2) by (n/2+1)∙(n/2+3)…n and so on.
The overall expression should look somewhat like:
$$2^{n(1-{\frac{1}{2}}^{log_{2}{n}})} \cdot 3^{log_{2}{\frac{n}{3}}+1} \cdot 5^{log_{2}{\frac{n}{5}}+1} \cdot 7^{log_{2}{\frac{n}{7}}+1} \ldots$$
A more naïve way (but not recommended) is to extract all \$2^k \cdot 5^{k'}\$ factors and multiply them separately.
Example:
1∙2∙3∙4∙5∙6∙…∙100,
M={2,5,2*2,2*5,5*5,2*2*2,2*2*5,2*5*5,2*2*5*5}
Multiplication of all these numbers isn't required, because we can instead calculate how many couples of (2,5) are there and then append as much zeroes to the remaining product.
Just by combining first and second methods together I came up with a conclusion:
$$\begin{align}
n! &= 2^{n-1}*5^{log_{2}{\frac{n}{5}}+1} \cdot 3^{log_{2}{\frac{n}{3}}+1} \cdot 7^{log_{2}{\frac{n}{7}}+1} \ldots \ldots \\
&= 10^{log_{2}{\frac{n}{5}}+1} \cdot 2^{n-log_{2}{\frac{n}{5}}-2} \cdot 3^{log_{2}{\frac{n}{3}}+1} \cdot 7^{log_{2}{\frac{n}{7}}+1} \ldots \ldots
\end{align}$$
This is equal to: \$ \cdot 2^{n-log_{2}{\frac{n}{5}}-2} \cdot 3^{log_{2}{\frac{n}{3}}+1} \cdot 7^{log_{2}{\frac{n}{7}}+1} \ldots \ldots x^{log_{2}{\frac{n}{x}}+1}\$ after \$ log_{2}{\frac{n}{5}}+1 \$ trailing zeroes with \$x\$ the last odd factor of \$n!\$
Hardcore way:
I named it so because of its deep arborescent structure, and it takes huge memory amount, but it gives out the least calculation of multiplying prime factors by their exponents.
First, we must build a very-ramified tree starting from the first prime number 2 until n.

Arcs are \$prime^e\$ of \$x^e\$ step where \$x\$ is the actual prime, and \$e\$ is next stage. We build the tree of prime \$x=2\$ first, and we stop when \$e\$ exceeds \$n\$.
Lines are:
Red lines are of step=4 where prime number \$x=2\$ is always of exponent \$e= 1\$
Generally we define all points where exponent of actual prime is constant: \$2^e(2k+1)\$ (e=2 green line), where \$k\$ is the actual step looked forward, and \$e\$ is constant exponent.
After this we highlight next prime \$x=3\$, and we do same process of tree-expanding of \$3^e(3k+1)\$ (e=1 yellow line) and \$3^e(3k+2)\$ (e=1 blue line) after all arcs of \$3^k\$ are developed.
- Once we come across an arc-node, we add the actual \$k\$ to the prime exponent at the level of the root of the tree. In general we have \$prime^{1+2+..+k}=prime^{\frac{k(k+1)}{2}}\$.
- Once we come across a line we just add the actual constant to all exponents of tree-roots which are linked to the actual number pointed by same lines, as a whole we have \$prime^{e+e+e+e} = prime^{e(k+1)}\$ where \$e\$ is the line attributed exponent.
The overall expression would look like:
In general: \$ x^{(n-x^e.l)/x^{e+1}} \$ while \$(n-lx^e)>0 \ and \ e>0 \ and \ l<x \$
So it is:
$$n! = \prod x^{\frac{(1+log_x{n})log_x{n}}{2}} * \prod \sum_{l=1} \sum_{e=1} x^{(n-x^e.l)/x^{e+1}}$$
With the biggest \$e\$ and \$l\$ which gives \$(n-lx^e)>0 \ \ and \ l<x \$ and all \$x\$ prime factors of n (correct me if I was wrong).
The memory issue can be reduced if we use prime generating polynomials but it seems you can't generate up to first 1681 primes using Euler polynomial. So it remains risky to engage in that with factorials bigger than 1681!