Cody

Solution 1628587

Submitted on 15 Sep 2018 by Michael Cappello
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
assert(isequal(decimate(10,3),4))

TF = logical 1 N = 4 5 6 7 8 9 10 1 2 N = 7 8 9 10 1 2 4 5 N = 10 1 2 4 5 7 8 N = 4 5 7 8 10 1 N = 8 10 1 4 5 N = 4 5 8 10 N = 10 4 5 N = 10 4 N = 4

2   Pass
assert(isequal(decimate(1024,3),676))

TF = logical 0

3   Pass
assert(isequal(decimate(2012,50),543))

TF = logical 0

4   Pass
assert(isequal(decimate(30,5),3))

TF = logical 0

5   Pass
assert(isequal(decimate(10,10),8))

TF = logical 0

6   Pass
assert(isequal(decimate(2048,2),1))

TF = logical 0