Cody

# Problem 2093. Who is the baby and who is the daddy in this family?

Solution 2164168

Submitted on 18 Mar 2020
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
Lee = [32 8 4 64 16 2]; baby= 2; dad = 64; family(1) = baby; family(2) = dad; assert(isequal(BabyDad(Lee),family));

Not enough input arguments. Error in lcm (line 15) if any(round(a(:)) ~= a(:) | round(b(:)) ~= b(:) | a(:) < 1 | b(:) < 1) Error in BabyDad (line 2) lcm(x) Error in Test1 (line 5) assert(isequal(BabyDad(Lee),family));

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

Not enough input arguments. Error in lcm (line 15) if any(round(a(:)) ~= a(:) | round(b(:)) ~= b(:) | a(:) < 1 | b(:) < 1) Error in BabyDad (line 2) lcm(x) Error in Test2 (line 5) assert(isequal(BabyDad(Jackson),family));

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

Not enough input arguments. Error in lcm (line 15) if any(round(a(:)) ~= a(:) | round(b(:)) ~= b(:) | a(:) < 1 | b(:) < 1) Error in BabyDad (line 2) lcm(x) Error in Test3 (line 5) assert(isequal(BabyDad(Smith),family));

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

Not enough input arguments. Error in lcm (line 15) if any(round(a(:)) ~= a(:) | round(b(:)) ~= b(:) | a(:) < 1 | b(:) < 1) Error in BabyDad (line 2) lcm(x) Error in Test4 (line 5) assert(isequal(BabyDad(Pitts),family));