Cody

Problem 45274. Fangs of pseudo-vampire number

Solution 2979322

Submitted on 22 Sep 2020 by Rafael S.T. Vieira
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))

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

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

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

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

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

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

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

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!