Cody

Solution 784995

Submitted on 28 Nov 2015 by Peng Liu
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
%% Lee = [32 8 4 64 16 2]; baby= 2; dad = 64; family(1) = baby; family(2) = dad; assert(isequal(BabyDad(Lee),family));

f = 32 32 f = 8 32 f = 4 32 f = 4 64 f = 4 64 f = 2 64

2   Pass
%% Jackson= [6, 10, 16, 28]; baby= 2; dad = 1680; family(1) = baby; family(2) = dad; assert(isequal(BabyDad(Jackson),family));

f = 6 6 f = 2 30 f = 2 240 f = 2 1680

3   Pass
%% Smith= [3 17 15 60 2 ]; baby= 1; dad = 1020; family(1) = baby; family(2) = dad; assert(isequal(BabyDad(Smith),family));

f = 3 3 f = 1 51 f = 1 255 f = 1 1020 f = 1 1020

4   Pass
%% Pitts= [10 6 12 20 ]; baby= 2; dad = 60; family(1) = baby; family(2) = dad; assert(isequal(BabyDad(Pitts),family));

f = 10 10 f = 2 30 f = 2 60 f = 2 60