Cody

Solution 2546565

Submitted on 14 Jun 2020 by Nikolaos Nikolaou
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
n = 4; d_correct = 4; assert(isequal(lastNonZeroDigitFactorial(n),d_correct))

d = 2 4 d = 4

2   Pass
n = 5; d_correct = 2; assert(isequal(lastNonZeroDigitFactorial(n),d_correct))

d = 1 2 d = 2

3   Pass
n = 6; d_correct = 2; assert(isequal(lastNonZeroDigitFactorial(n),d_correct))

d = 7 2 d = 2

4   Pass
n = 7; d_correct = 4; assert(isequal(lastNonZeroDigitFactorial(n),d_correct))

d = 5 4 d = 4

5   Pass
n = 8; d_correct = 2; assert(isequal(lastNonZeroDigitFactorial(n),d_correct))

d = 4 3 2 d = 2

6   Pass
n = 9; d_correct = 8; assert(isequal(lastNonZeroDigitFactorial(n),d_correct))

d = 3 6 2 8 8 d = 8

7   Pass
n = 10; d_correct = 8; assert(isequal(lastNonZeroDigitFactorial(n),d_correct))

d = 3 6 2 8 8 d = 8