Cody

Problem 44316. Pandigital Multiples of 11 (based on Project Euler 491)

Solution 1391290

Submitted on 23 Dec 2017 by Daniel Pereira
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 = 2;y_correct = 0; assert(isequal(pandigitalby11(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

2   Pass
x = 3;y_correct = 6; assert(isequal(pandigitalby11(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

3   Pass
x = 7;y_correct = 4032; assert(isequal(pandigitalby11(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

4   Pass
p6=pandigitalby11(6); p8=pandigitalby11(8); p9=pandigitalby11(9); assert(p8>p6); assert(p9>p8); f6=factor(p6); f8=factor(p8); f9=factor(p9); f9e1=f9(end-1); assert(p6>256); assert(max(f9)<max(f8)); assert(f9e1>max(f6)); assert(numel(f9)>numel(f8));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

5   Pass
x = 11;y_correct = 9072000; assert(isequal(pandigitalby11(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

6   Pass
x = 14;y_correct = 3216477600; assert(isequal(pandigitalby11(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

7   Pass
assert(isequal(pandigitalby11(16),222911740800))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]