Find the number of zeros in which the decimal expansion of ends. Also find its last non-zero digit.
Problem 1174
Official solution
1. **Finding the number of trailing zeros in :**
The number of trailing zeros in is determined by the number of times is a factor in . Since , and there are always more factors of than in factorials, we only need to count the number of factors of .
The number of factors of in can be found using the formula:
Calculating each term:
Summing these values:
Therefore, the number of trailing zeros in is .
2. **Finding the last non-zero digit of :**
To find the last non-zero digit of , we need to consider the factorial modulo while ignoring the factors of (i.e., factors of and ).
We use the fact that and apply it repeatedly. This is based on the property of factorials and modular arithmetic.
First, we need to find modulo :
This is because the product of numbers modulo cycles every numbers (since ).
Next, we need to consider the powers of modulo . Since has trailing zeros, we can ignore these factors of and focus on the remaining product modulo .
By examining the pattern of the last non-zero digits of factorials, we find that the last non-zero digit of is .
The final answer is trailing zeros and the last non-zero digit is .