Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x = 40;
y = [40 20 10 4];
z_correct = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 0 1 8; 0 0 0 10];
assert(isequal(your_fcn_name(x,y),z_correct))
rm: it is dangerous to operate recursively on '/'
rm: use --no-preserve-root to override this failsafe
|
2 | Pass |
x = 13;
y = [40 20 10 4];
z_correct = [1 0 0 0; 0 1 0 0; 0 0 2 0; 0 0 1 1; 0 0 0 4];
assert(isequal(your_fcn_name(x,y),z_correct))
|
3 | Pass |
x = 19;
y = [10 4];
z_correct = [2 0; 1 3; 0 5];
assert(isequal(your_fcn_name(x,y),z_correct))
|
47 Solvers
Make an awesome ramp for a tiny motorcycle stuntman
262 Solvers
138 Solvers
106 Solvers
Remove entire row and column in the matrix containing the input values
109 Solvers