Cody

Solution 104760

Submitted on 29 Jun 2012 by Aurelien Queffurust
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
%% x = 10000; y_correct = x; z = simplepartition(x); zL = length(z); assert(isequal(sum(unique(z)),y_correct) && zL >= ceil(log2(x)/2)) x = 40190; y_correct = x; z = simplepartition(x); zL = length(z); assert(isequal(sum(unique(z)),y_correct) && zL >= ceil(log2(x)/2)) x = 149; y_correct = x; z = simplepartition(x); zL = length(z); assert(isequal(sum(unique(z)),y_correct) && zL >= ceil(log2(x)/2))

tf = 1 y = Columns 1 through 5 2907 1036 200 2181 1597 Columns 6 through 8 272 1250 557 tf = 1 y = Columns 1 through 5 3461 5039 3323 1224 1396 Columns 6 through 9 5696 4314 12509 3228 tf = 1 y = 61 4 33 43 8