Cody

Solution 1967218

Submitted on 8 Oct 2019
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=3; y=[1 0 1 0 1 0 1 0 1]; assert(isequal(X(n),y))

y = 0 0 0 0 0 0 0 0 0 a = 3 a = 3 y = 1 0 0 0 0 0 0 0 0 z = 0 0 0 0 0 0 1 0 0 m = 3 m = 3 z = 1 0 0 0 0 0 1 0 0 z = 1 0 0 0 1 0 1 0 0 z = 1 0 0 0 1 0 1 0 1 y = 1 0 0 0 1 0 0 0 0 z = 0 0 0 0 1 0 1 0 0 m = 3 m = 3 z = 1 0 0 0 1 0 1 0 0 z = 1 0 0 0 1 0 1 0 0 z = 1 0 0 0 1 0 1 0 1 y = 1 0 0 0 1 0 0 0 1 z = 0 0 1 0 1 0 1 0 0 m = 3 m = 3 z = 1 0 1 0 1 0 1 0 0 z = 1 0 1 0 1 0 1 0 0 z = 1 0 1 0 1 0 1 0 1

Assertion failed.

2   Fail
n=4; y=[1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1]; assert(isequal(X(n),y))

y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 4 a = 4 y = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z = 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 m = 4 m = 4 z = 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 z = 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 z = 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 z = 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 y = 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 z = 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 m = 4 m = 4 z = 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 z = 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 z = 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 z = 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 1 y = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 z = 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 m = 4 m = 4 z = 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 z = 1 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 z = 1 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 z = 1 0 0 0 0 1 1 0 0 1 1 0 1 0 0 1 y = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 z = 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 m = 4 m = 4 z = 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 z = 1 0 0 1 0 1 1 0 0 1 0 0 1 0 0 0 z = 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 0 z = 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1

Assertion failed.

3   Fail
n=1; y=[1] assert(isequal(X(n),y))

y = 1

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

4   Fail
n=2; y=[1 1;1 1] assert(isequal(X(n),y))

y = 1 1 1 1

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

5   Fail
n=5; y=[1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1]; assert(isequal(X(n),y))

y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 5 a = 5 y = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 m = 5 m = 5 z = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 z = 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 z = 1 0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