Cody

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

Solution 3721113

Submitted on 19 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   Fail
m = 1; n_correct = 5; assert(isequal(factorialForZeros(m),n_correct))

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test1 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test2 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test3 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test4 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test5 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test6 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test7 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test8 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test9 (line 3) assert(isequal(factorialForZeros(m),n_correct))

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

Unrecognized function or variable 'ck'. Error in factorialForZeros (line 2) while ck<m Error in Test10 (line 3) assert(isequal(factorialForZeros(m),n_correct))

### Community Treasure Hunt

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

Start Hunting!