Doubt Regarding Homework question

i was going through the concept class of Factors and Multiples in which there was a homework question for finding the trailing 0s in 25!, greg gave a tip to count the number of 10s in it which i couldn’t understand. Can you explain it to me?

To get a trailing zero you multiply any number by 10, for example the trailing zero in 2000 is 3 and it comes from 2 * 10 * 10 * 10.

So in the problem you stated you have to find the number of 10s in 25!, to calculate this you will find the number of 2s and 5s (becoz 10 = 2 * 5), the number of 2s = 22 and 5s = 6 hence you can make 6 10s therefore the you will have 6 trailing zeros in 25!

1 Like

okay can you tell me how you get 6 5s and 22 2s , just give me examples

1 2 3 4 5 => 2s 1 and 5s 1
6 7 8 9 10 => 2s 2 and 5s 1
similarly till 25

basically break the number into prime factors and then just count 2s and 5s

okay i got it, was not breaking into prime factors, im stupid.
thanks for your help .
there’s one more thing, in some website i read that there’s no need to count the 2s in this situation and if we count the 6 5s that gives us the answer which is 6 trailing 0s

well what if you have 3 2s and 6 5s then the answer would have been 3 zeros, it depends on the limiting number

cool got it, thanks