Cody

# Problem 1825. Find all vampire fangs

Solution 304801

Submitted on 15 Aug 2013 by James
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 = 125460; factors = vampire_factor(x); correct_factors = [204 615; 246 510]; assert(isequal(factors,correct_factors))

cf = 615 cf = 615 510 cf = 615 510 246 cf = 615 510 246 204 cf = 204 615 246 510 510 246 615 204

2   Pass
%% x = 1827; factors = vampire_factor(x); correct_factors = [21 87]; assert(isequal(factors,correct_factors))

cf = 21 cf = 21 87 cf = 21 87 87 21

3   Pass
%% x = 100; factors = vampire_factor(x); correct_factors = []; assert(isequal(factors,correct_factors))

4   Pass
%% x = 13078260; factors = vampire_factor(x); correct_factors = [1620 8073; 1863 7020; 2070 6318]; assert(isequal(factors,correct_factors))

cf = 6318 cf = 6318 6318 cf = 6318 6318 2070 cf = 6318 6318 2070 2070 cf = 6318 6318 2070 2070 8073 cf = 6318 6318 2070 2070 8073 8073 cf = 6318 6318 2070 2070 8073 8073 7020 cf = 6318 6318 2070 2070 8073 8073 7020 7020 cf = 6318 6318 2070 2070 8073 8073 7020 7020 1620 cf = 6318 6318 2070 2070 8073 8073 7020 7020 1620 1620 cf = 6318 6318 2070 2070 8073 8073 7020 7020 1620 1620 1863 cf = 6318 6318 2070 2070 8073 8073 7020 7020 1620 1620 1863 1863 cf = 1620 8073 1863 7020 2070 6318 6318 2070 7020 1863 8073 1620

5   Pass
%% x = randi([125460 125500],1); factors = vampire_factor(x); correct_factors = []; assert(isequal(factors,correct_factors))