Cody

Problem 45229. Bell Triangle

Solution 2114866

Submitted on 2 Feb 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
n = 1; y_correct = 1; assert(isequal(Bell_tri(n),y_correct))

s = 1

Output argument "y" (and maybe others) not assigned during call to "Bell_tri". Error in Test1 (line 3) assert(isequal(Bell_tri(n),y_correct))

2   Fail
n = 5; y_correct = [1 0 0 0 0; 1 2 0 0 0; 2 3 5 0 0; 5 7 10 15 0; 15 20 27 37 52]; assert(isequal(Bell_tri(n),y_correct))

s = 1 s = 1 2 s = 2 3 5 s = 5 7 10 15 s = 15 20 27 37 52

Output argument "y" (and maybe others) not assigned during call to "Bell_tri". Error in Test2 (line 3) assert(isequal(Bell_tri(n),y_correct))

3   Fail
n = 9; y_correct = [ 1 0 0 0 0 0 0 0 0; 1 2 0 0 0 0 0 0 0; 2 3 5 0 0 0 0 0 0; 5 7 10 15 0 0 0 0 0; 15 20 27 37 52 0 0 0 0; 52 67 87 114 151 203 0 0 0; 203 255 322 409 523 674 877 0 0; 877 1080 1335 1657 2066 2589 3263 4140 0; 4140 5017 6097 7432 9089 11155 13744 17007 21147]; assert(isequal(Bell_tri(n),y_correct))

s = 1 s = 1 2 s = 2 3 5 s = 5 7 10 15 s = 15 20 27 37 52 s = 52 67 87 114 151 203 s = 203 255 322 409 523 674 877 s = 877 1080 1335 1657 2066 2589 3263 4140 s = 4140 5017 6097 7432 9089 11155 13744 17007 21147

Output argument "y" (and maybe others) not assigned during call to "Bell_tri". Error in Test3 (line 11) assert(isequal(Bell_tri(n),y_correct))