Tricky solution!
How do I view solutions? Everything is locked. It says I may solve ANOTHER problem to unlock, but I keep solving and everything is still locked. Not terribly helpful.
You have to solve additional problems and then come back to look at the solutions here.
Nice and simple "math" solution!
if i can do that i dont need to view this solution,what a stupid rule
so stupid rule!!
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 5;
a = [1 0 1 0 1;
0 1 0 1 0;
1 0 1 0 1;
0 1 0 1 0;
1 0 1 0 1];
assert(isequal(a,checkerboard(n)))
ans =
[]
|
2 | Pass |
%%
n = 4;
a = [1 0 1 0;
0 1 0 1;
1 0 1 0;
0 1 0 1];
assert(isequal(a,checkerboard(n)))
ans =
[]
|
3 | Pass |
%%
n = 7;
a = [1 0 1 0 1 0 1
0 1 0 1 0 1 0
1 0 1 0 1 0 1
0 1 0 1 0 1 0
1 0 1 0 1 0 1
0 1 0 1 0 1 0
1 0 1 0 1 0 1];
assert(isequal(a,checkerboard(n)))
ans =
[]
|
Determine whether a vector is monotonically increasing
9247 Solvers
Find the numeric mean of the prime numbers in a matrix.
5902 Solvers
263 Solvers
270 Solvers
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
614 Solvers