What is the last non-zero digit of the product of the first hundred natural numbers?





Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.
The only difficulty is caused by factors divisible by 5, which, when multiplied by an appropriate even number, result in a number ending in 0. If we factorize the product into prime factors, this difficulty does not arise.

I. Solution: Among the first 100 numbers, there are 50 even numbers, of which 25 are also divisible by 4, 12 by 8, 6 by 16, 3 by 32, and 1 (the number 64 itself) by 64. Thus, the product is divisible by $2$ to the power of $(50+25+12+6+3+1=) 97$. Similarly, we can determine the exponents of the other prime numbers and find that $1 \cdot 2 \cdot 3 \cdot \ldots \cdot 99 \cdot 100=$ $2^{87} \cdot 3^{48} \cdot 5^{24} \cdot 7^{16} \cdot 11^{9} \cdot 13^{7} \cdot 17^{5} \cdot 19^{5} \cdot 23^{4} \cdot 29^{3} \cdot 31^{3} \cdot 37^{2} \cdot 41^{2} \cdot 43^{2} \cdot 47^{2} \cdot 53 \cdot 59 \cdot 61 \cdot 67 \cdot 71 \cdot 73 \cdot 79 \cdot 83 \cdot 89 \cdot 97$. By pairing the 5th power with the 2nd power of the same exponent, we get $10^{24}$, which, when multiplied, does not change the last digit, so this factor can be omitted. The last digit of the product can be obtained by multiplying only the last digits of the remaining factors, so we can also omit the tens from each individual factor and completely omit the factors ending in 1. Therefore, the last significant digit of the product in question is the same as that of the following product:

$$
\begin{gathered}
2^{73} \cdot 3^{48} \cdot 7^{16} \cdot 3^{7} \cdot 7^{5} \cdot 9^{5} \cdot 3^{4} \cdot 9^{3} \cdot 7^{2} \cdot 3^{2} \cdot 7^{2} \cdot 3 \cdot 9 \cdot 7 \cdot 3 \cdot 9 \cdot 3 \cdot 9 \cdot 7= \\
=2^{73} \cdot 3^{86} \cdot 7^{27}=16^{18} \cdot 2 \cdot 81^{21} \cdot 3^{2} \cdot\left(49^{2}\right)^{6} \cdot 7^{3}
\end{gathered}
$$

Any power of a number ending in 6 also ends in 6. If we multiply an even number by 6, the last digit does not change. Thus, the last digit of the product of the first two factors is 2. The third factor can be omitted, as can the fifth, because $49^{2}$ also ends in 1. The last digit of $7^{3}$ is 3, so the product of the first 100 natural numbers ends in the same digit as $2 \cdot 9 \cdot 3$, which is 4.

It is obvious that only the 2 and 5 prime factors played a significant role here, and only until we separated the highest power of 10 by which the product is divisible. After that, the primality of the individual factors was no longer significant, as we replaced some of the ones with the composite number 9. Thus, the prime factorization appears to be a superfluous tool and can indeed be omitted, as shown by the following II. solution.

II. Solution: Select separately those factors whose last significant digit is 2 or 5 (including 20 and 50). $20 \cdot 50=1000$ does not affect the last digit of the product in question, nor does the product of 2 and 5, which can be separated from the selected even factors and the odd factors, respectively. The product of the selected factors is therefore

$$
\begin{aligned}
& 2 \cdot 12 \cdot 22 \cdot \ldots \cdot 82 \cdot 92 \cdot 5 \cdot 15 \cdot 25 \cdot \ldots \cdot 75 \cdot 85 \cdot 95 \cdot 20 \cdot 50= \\
& \quad=1 \cdot 6 \cdot 11 \cdot \ldots \cdot 36 \cdot 41 \cdot 46 \cdot 1 \cdot 3 \cdot 5 \cdot \ldots \cdot 15 \cdot 17 \cdot 19 \cdot 10^{13}
\end{aligned}
$$

Thus, only two factors ending in 5 remain, the 5 and 15. Multiply these by 36:

$$
5 \cdot 15 \cdot 36=5 \cdot 5 \cdot 3 \cdot 9 \cdot 4=2700
$$

The other selected factors ending in 1 can be omitted, as can the product of the 6s. It is sufficient to take the last significant digit of the multi-digit numbers, so the product of the selected factors ends in the same digit as

$$
7 \cdot 6(1 \cdot 3 \cdot 7 \cdot 9)^{2}
$$

The last digit of $3 \cdot 7$ is 1, and so is that of $9^{2}$, while $7 \cdot 6$ ends in 2, so the last digit of this product is 2.

We can omit those of the other factors whose last significant digit is 1. Then select separately the factors ending in 0. Grouping the other factors into sixes, we get 11 such groups, each containing one factor ending in 3, 4, 6, 7, 8, and 9, respectively, so the product of the first 100 natural numbers ends in the same digit as

$$
2 \cdot(3 \cdot 4 \cdot 6 \cdot 7 \cdot 8 \cdot 9)^{11}
$$

The last digit of the product in parentheses is 8, the last digit of $8^{4}$ is 6, and so is that of $8^{8}$, but multiplying an even number by 6 does not change the last digit, so the digit we are looking for is the same as the last digit of $2 \cdot 8^{3}$. The last digit of $8^{3}$ is 2, so the last significant digit of the product of the first 100 natural numbers is 4.