This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 1;
y_correct = 1;
assert(isequal(ResultMatrix(n),y_correct))
y =
1
|
2 | Pass |
n = 10;
y_correct = [100 90 80 70 60 50 40 30 20 10;
90 81 72 63 54 45 36 27 18 9;
80 72 64 56 48 40 32 24 16 8;
70 63 56 49 42 35 28 21 14 7;
60 54 48 42 36 30 24 18 12 6;
50 45 40 35 30 25 20 15 10 5;
40 36 32 28 24 20 16 12 8 4;
30 27 24 21 18 15 12 9 6 3;
20 18 16 14 12 10 8 6 4 2;
10 9 8 7 6 5 4 3 2 1];
assert(isequal(ResultMatrix(n),y_correct))
|
3 | Pass |
n = 5;
y_correct = [25 20 15 10 5;
20 16 12 8 4;
15 12 9 6 3;
10 8 6 4 2;
5 4 3 2 1];
assert(isequal(ResultMatrix(n),y_correct))
|
263 Solvers
255 Solvers
Find out total non zero element of matrix
147 Solvers
283 Solvers
36 Solvers