Cody

Solution 1671292

Submitted on 10 Nov 2018 by William
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   Pass
n=2; p=2; y_correct=[1 3 1 4 2 3 2 4]; assert(isequal(your_fcn_name(n,p),y_correct))

2   Pass
n=3; p=5; y_correct=[1 4 7 10 13 1 4 7 10 14 1 4 7 11 13 1 4 7 11 14 1 4 7 11 15 1 4 8 10 13 1 4 8 10 14 1 4 8 11 13 1 4 8 11 14 1 4 8 11 15 1 4 8 12 14 1 4 8 12 15 1 5 7 10 13 1 5 7 10 14 1 5 7 11 13 1 5 7 11 14 1 5 7 11 15 1 5 8 10 13 1 5 8 10 14 1 5 8 11 13 1 5 8 11 14 1 5 8 11 15 1 5 8 12 14 1 5 8 12 15 1 5 9 11 13 1 5 9 11 14 1 5 9 11 15 1 5 9 12 14 1 5 9 12 15 2 4 7 10 13 2 4 7 10 14 2 4 7 11 13 2 4 7 11 14 2 4 7 11 15 2 4 8 10 13 2 4 8 10 14 2 4 8 11 13 2 4 8 11 14 2 4 8 11 15 2 4 8 12 14 2 4 8 12 15 2 5 7 10 13 2 5 7 10 14 2 5 7 11 13 2 5 7 11 14 2 5 7 11 15 2 5 8 10 13 2 5 8 10 14 2 5 8 11 13 2 5 8 11 14 2 5 8 11 15 2 5 8 12 14 2 5 8 12 15 2 5 9 11 13 2 5 9 11 14 2 5 9 11 15 2 5 9 12 14 2 5 9 12 15 2 6 8 10 13 2 6 8 10 14 2 6 8 11 13 2 6 8 11 14 2 6 8 11 15 2 6 8 12 14 2 6 8 12 15 2 6 9 11 13 2 6 9 11 14 2 6 9 11 15 2 6 9 12 14 2 6 9 12 15 3 5 7 10 13 3 5 7 10 14 3 5 7 11 13 3 5 7 11 14 3 5 7 11 15 3 5 8 10 13 3 5 8 10 14 3 5 8 11 13 3 5 8 11 14 3 5 8 11 15 3 5 8 12 14 3 5 8 12 15 3 5 9 11 13 3 5 9 11 14 3 5 9 11 15 3 5 9 12 14 3 5 9 12 15 3 6 8 10 13 3 6 8 10 14 3 6 8 11 13 3 6 8 11 14 3 6 8 11 15 3 6 8 12 14 3 6 8 12 15 3 6 9 11 13 3 6 9 11 14 3 6 9 11 15 3 6 9 12 14 3 6 9 12 15]; assert(isequal(your_fcn_name(n,p),y_correct))

3   Pass
n=3; p=3; y_correct =[1 4 7 1 4 8 1 5 7 1 5 8 1 5 9 2 4 7 2 4 8 2 5 7 2 5 8 2 5 9 2 6 8 2 6 9 3 5 7 3 5 8 3 5 9 3 6 8 3 6 9]; assert(isequal(your_fcn_name(n,p),y_correct))