Cody

# Problem 44071. Smallest n, for n! to have m trailing zero digits

Solution 3564795

Submitted on 6 Nov 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
m = 1; n_correct = 5; assert(isequal(factorialForZeros(m),n_correct))

2   Fail
m = 2; n_correct = 10; assert(isequal(factorialForZeros(m),n_correct))

Assertion failed.

3   Pass
m = 6; n_correct = 25; assert(isequal(factorialForZeros(m),n_correct))

4   Pass
m = 5; n_correct = 25; assert(isequal(factorialForZeros(m),n_correct))

5   Fail
m = 4; n_correct = 20; assert(isequal(factorialForZeros(m),n_correct))

Assertion failed.

6   Pass
m = 156; n_correct = 625; assert(isequal(factorialForZeros(m),n_correct))

7   Pass
m = 155; n_correct = 625; assert(isequal(factorialForZeros(m),n_correct))

8   Pass
m = 154; n_correct = 625; assert(isequal(factorialForZeros(m),n_correct))

9   Pass
m = 153; n_correct = 625; assert(isequal(factorialForZeros(m),n_correct))

10   Fail
m = 152; n_correct = 620; assert(isequal(factorialForZeros(m),n_correct))

Assertion failed.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!