Cody

Solution 2169609

Submitted on 22 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   Pass
x = 126; y_correct = { '6' , '21' }; assert(isequal(pseudovampire_fangs(x),y_correct))

f = 2 3 3 7 h = 1×2 cell array {'6'} {'21'} yea = 1×2 cell array {'6'} {'21'}

2   Pass
x = 153; y_correct = { '3' , '51' }; assert(isequal(pseudovampire_fangs(x),y_correct))

f = 3 3 17 h = 1×2 cell array {'3'} {'51'} yea = 1×2 cell array {'3'} {'51'}

3   Fail
x = 1395; y_correct = { {'15' , '93'},{'5','9','31'} }; assert(isequal(pseudovampire_fangs(x),y_correct))

f = 3 3 5 31

Unrecognized function or variable 'h'. Error in pseudovampire_fangs (line 60) clear yea, yea = h Error in Test3 (line 3) assert(isequal(pseudovampire_fangs(x),y_correct))

4   Pass
x = 12768; y_correct = { '8' , '21' ,'76'}; assert(isequal(pseudovampire_fangs(x),y_correct))

f = 2 2 2 2 2 3 7 19 h = 1×3 cell array {'8'} {'21'} {'76'} yea = 1×3 cell array {'8'} {'21'} {'76'}

5   Pass
x = 11439; y_correct = { '9' , '31','41' }; assert(isequal(pseudovampire_fangs(x),y_correct))

f = 3 3 31 41 h = 1×3 cell array {'9'} {'31'} {'41'} yea = 1×3 cell array {'9'} {'31'} {'41'}

6   Fail
x = 146137; y_correct = { '317' , '461' }; assert(isequal(pseudovampire_fangs(x),y_correct))

f = 317 461

Unrecognized function or variable 'h'. Error in pseudovampire_fangs (line 60) clear yea, yea = h Error in Test6 (line 3) assert(isequal(pseudovampire_fangs(x),y_correct))

7   Pass
x = 1206; y_correct = { '6' , '201' }; assert(isequal(pseudovampire_fangs(x),y_correct))

f = 2 3 3 67 h = 1×2 cell array {'6'} {'201'} yea = 1×2 cell array {'6'} {'201'}

8   Pass
%x = 1260; %y_correct = { {'6' , '210'},{'21','60'} }; %assert(isequal(pseudovampire_fangs(x),y_correct))