Advertisement
Guest User

Untitled

a guest
May 28th, 2015
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. Zeros end of a number is made by multiplies of 2 and 5. So the number of zeros at the end of 100! is minimum value between the number of 2 in 100! and the number of 5 in 100! . And we can get this by getting min ( [100 div 2] + [100 div 4] + … + [100 div 64], [100 div 5] + [100 div 25]).


  2. [100 div 5] + [100 div 25] =20 + 4 = 24.

  3. [100 div 2] + [100 div 4] + … + [100 div 64] = 50 + 25 + 12 + … + 1 and it is much bigger than 24.


  4.  
  5. So the answer is 24.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement