100!: Trailing Zeroes

How many trailing zeros are there in 100! (factorial of 100)?

Answer

This is an easy problem. We know that each pair of 2 and 5 will give a trailing zero. If we perform prime number decomposition on all the numbers in 100!, it is obvious that the frequency of 2 will far outnumber the frequency of 5. So the frequency of 5 determines the number of trailing zeros. Among numbers 1, 2, …, 99, and 100, 20 numbers are divisible by 5 (5, 10, …, 100). Among these 20 numbers, 4 are divisible by \(5^2\) (25, 50, 75, 100). So the total frequency of 5 is 24 and there are 24 trailing zeros.

Notes and comments

Comment 1: What about 125!? The answer is \(25 + 5 + 1\).

Back to collection