Problem 44071. Smallest n, for n! to have m trailing zero digits
Solution Stats
Problem Comments
Solution Comments
-
1 Comment
yurenchu
on 7 Mar 2017
I think this is (so far) the most efficient solution for large m. It requires at most log(4*m)/log(5) iterations; while the smaller sized solutions that have been suggested require at least 0.8*m iterations (or a very large array). For example, for m = 10^5, this solution takes at most 8 iterations while the other solutions of smaller size require at least 80,000 iterations.
Problem Recent Solvers41
Suggested Problems
-
9246 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
482 Solvers
-
238 Solvers
-
Are all the three given point in the same line?
331 Solvers
-
252 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!