Solving $x!=n$ without a calculator for large $n$ 
Solve the equation for $x$: $$x!=n$$ where $x,n \in \mathbb N$.

(Here $n \in \mathbb N$ is a given number such that $x!=n$ has a solution in $x \in \mathbb N$.)
The problem is easy with a calculator and for small $n$. But I want to solve this for large $n$ without a calculator (Why? Just curious!).
Here is an example of how large $n$ can be: $$x!=523 022 617 466 601 111 760 007 224 100 074 291 200 000 000$$ (Here $n$ is a $45$-digit number and $x=38$.)
To solve the equation, I could think of two methods. Here is their description:
Method 1 - prime factorization:
In this method, we find the prime factorization of $n$. To do this, we keep dividing $n$ by $2$ until we get an odd number. This is equivalent to finding $\log_2 n$. But since $n$ is a large number, it is very difficult and long process.
For the example problem, we have to divide $n$ by $2$, $35$ times. Yet this doesn't give the exact answer. Since $\lfloor 38/2 \rfloor + \lfloor 38/2^2 \rfloor + \dots =\lfloor 39/2 \rfloor + \lfloor 39/2^2 \rfloor + \dots=35$ this implies that $x=38$ or $x=39$. We have to divide the $n$ by $13^3$ to be sure that $x=38$ is the solution.
Method 2 - Stirling's approximation:
In this method, we use the Stirling's approximation formula, which is $x! \sim \sqrt {2\pi x}(\frac x e)^x$. But it is not easy to find $x$ in terms of $n$. Here is my workings to do that: $$x!=n$$ $$\implies \sqrt {2\pi x}(\frac x e)^x=n$$ $$\implies 2\pi x (\frac x e)^{2x}=n^2$$ $$\implies x^ {2x+1}\cdot \frac 1 {e^{2x}}=\frac {n^2}{2\pi}$$
I am unable to proceed after that. But I don't think the derived equation can solve for $x$ in terms of $n$ without using a calculator (or at least this would be too hard).

I hope my workings are correct. So, is there some easier way to solve the equation? And how do I complete my workings on method 2?
 A: Extending Henry's suggestion,  we have any factor of 5 is going to be preceded by a factor of 2,  so we can count the number of factors of 5 by counting the trailing 0's.
Every 5th 0 counts as two 5s, since those are multiples of 25.  Every 25th 0 counts as 3 5s,  etc.  In other words, we just need to correct for the "overcounts" of 0s by things that have more than one factor of 5.
Thus,  we know the largest the largest multiple of 5 is equal to or less than $x$ is  given by letting $m$ equaling the number of trailing 0s in $n$ and solving for $r$ as follows:
$$r:=\lfloor m/5 \rfloor + \lfloor m/5^2 \rfloor + \dots $$
Then we get
$$5r\leq x<5(r+1)  $$
This converges a lot faster than powers of 2 and then narrows your answer down to 5 possibilities.  I'm not sure if there's a simple way to expressly state $x4$ in terms of $n$ beyond this range of 5 to check,  but if you didn't need that, this converges fast enough and is easy enough to check the remaining numbers
A: Just looking at the number of digits seems to provide an accurate solution for $x > 9$.
$\ln x! = \sum_{1 \le k\le x} \ln k \approx \int _{1}^{x+1} \ln x\,\mathrm dx + \frac12 \ln (x+1)=(x+\frac12) \ln (x+1) - x$
The error tends to a constant, and by numerical evidence it is around 0.1. Therefore one can just ignore it.
So converting to digits, $\log x! \approx (x+\frac12) \log (x+1) - \frac x{\ln 10}$. This should serve for most purposes.
For $x < 10$, recite the factorials.
