Factorial modular arithemetic 
Find $50!/(10^{12}) \pmod{10}$. 

Let $N$ represent the number then,
$N \equiv 0 \pmod{2}$
For mod 5 it is harder.
$N^{4} \equiv 1 \pmod{5}$.
How to solve this? 
 A: \begin{align}
   \lfloor 50/2 \rfloor &= 25\\
   \lfloor 25/2 \rfloor &= 12\\
   \lfloor 12/2 \rfloor &= 6\\
   \lfloor 6/2 \rfloor &= 3\\
   \lfloor 3/2 \rfloor &= 1\\
   \lfloor 1/2 \rfloor &= 0\\
   25 + 12 + 6 + 3 + 1 &= 47
\end{align}
So $2^{47} \mid 50!$. It follows that $\dfrac{50!}{2^{12}} \equiv 0 \pmod 2$
\begin{align}
   \lfloor 50/5 \rfloor &= 10\\
   \lfloor 10/5 \rfloor &= 2\\
   \lfloor 2/5 \rfloor &= 0\\
   10+ 2 &= 12
\end{align}
So $5^{12} \mid 50!$.
Note
\begin{align}
   50!
   &= \prod_{n=0}^{9} (5n+1)\times(5n+2)\times(5n+3)\times(5n+4)\times(5n+5)\\
   &= \left( \prod_{n=0}^{9} (5n+1)\times(5n+2)\times(5n+3)\times(5n+4)\right)
   \left( \prod_{n=0}^{9} (5n+5)\right)\\
\end{align}
So
\begin{align}
   \dfrac{50!}{5^{12}}
   &= \left( \prod_{n=0}^{9} (5n+1)\times(5n+2)\times(5n+3)\times(5n+4)\right)
   \dfrac{\prod_{n=0}^{9} (5n+5)}{5^{12}}\\
   &\equiv \left( \prod_{n=0}^{9} (1\times 2\times 3\times 4)\right)
   (1\times 2\times 3\times 4) \times 1 \times
   (1\times 2\times 3\times 4) \times 2
   \pmod 5\\
   &\equiv (-1)^{12} \times 1 \times 2 \pmod 5\\
   &\equiv 2 \pmod 5\\
\end{align}
That is, $\dfrac{50!}{5^{12}} \equiv 2 \pmod 5$
If $x \equiv a \pmod 2$ and $x \equiv b \pmod 5$, then $x \equiv 5a + 6b \pmod {10}$. So $\dfrac{50!}{5^{12}} \equiv 2 \pmod{10}$
