Skip to main content
6 events
when toggle format what by license comment
Oct 31, 2017 at 10:20 history edited Mast CC BY-SA 3.0
deleted 24 characters in body
Oct 19, 2017 at 12:44 comment added Jim After a night's sleep (the above was at 2am), I think you only need to count the times 5^N (5 to the power of N) divides into T, with a loop on N++, N>0. Stop the loop when 5^N > T. Why does this work - Since there are so many more 2 factors than 5 factors, any 5^N essentially becomes a number with N zeroes at the end (5x2=10, 25x4=100, 125x8=1000, etc.). Just up to 100!, there are 50 2-factors, but only 20 5-factors, giving us this surplus of 2s that make this work.
Oct 19, 2017 at 5:47 history edited Jim CC BY-SA 3.0
added 176 characters in body
Oct 19, 2017 at 5:34 history edited Jim CC BY-SA 3.0
Editted to add an example
Oct 19, 2017 at 5:29 review First posts
Oct 19, 2017 at 5:30
Oct 19, 2017 at 5:25 history answered Jim CC BY-SA 3.0