Cody

Solution 1031010

Submitted on 25 Oct 2016 by Jakub Mrowka
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
x = 5; y_correct = 120; assert(isequal(fact(x),y_correct))

Result = 1 Result = 2 Result = 6 Result = 24 Result = 120

2   Pass
x = 8; y_correct = 40320; assert(isequal(fact(x),y_correct))

Result = 1 Result = 2 Result = 6 Result = 24 Result = 120 Result = 720 Result = 5040 Result = 40320

3   Pass
x = 33; y_correct = 8.683317618811886e+36; assert(isequal(fact(x),y_correct))

Result = 1 Result = 2 Result = 6 Result = 24 Result = 120 Result = 720 Result = 5040 Result = 40320 Result = 362880 Result = 3628800 Result = 39916800 Result = 479001600 Result = 6.2270e+09 Result = 8.7178e+10 Result = 1.3077e+12 Result = 2.0923e+13 Result = 3.5569e+14 Result = 6.4024e+15 Result = 1.2165e+17 Result = 2.4329e+18 Result = 5.1091e+19 Result = 1.1240e+21 Result = 2.5852e+22 Result = 6.2045e+23 Result = 1.5511e+25 Result = 4.0329e+26 Result = 1.0889e+28 Result = 3.0489e+29 Result = 8.8418e+30 Result = 2.6525e+32 Result = 8.2228e+33 Result = 2.6313e+35 Result = 8.6833e+36

Suggested Problems