Cody

Solution 1996499

Submitted on 30 Oct 2019 by Doan Quang Manh
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 = 1; y_correct = true; assert(isequal(is_pandigital(x),y_correct))

flag = '1' b = 1 p = 1 p = 1 flag = logical 1

2   Pass
x = 0; y_correct = false; assert(isequal(is_pandigital(x),y_correct))

flag = '0' b = 1 p = 1 p = 0 flag = logical 0

3   Pass
x = 100; y_correct = false; assert(isequal(is_pandigital(x),y_correct))

flag = '100' b = 6 p = 1 p = 1 p = 0 p = 0 flag = logical 0

4   Pass
x = 123; y_correct = true; assert(isequal(is_pandigital(x),y_correct))

flag = '123' b = 6 p = 1 p = 1 p = 2 p = 6 flag = logical 1

5   Pass
x = 1203; y_correct = false; assert(isequal(is_pandigital(x),y_correct))

flag = '1203' b = 24 p = 1 p = 1 p = 2 p = 0 p = 0 flag = logical 0

6   Pass
x = 5432; y_correct = false; assert(isequal(is_pandigital(x),y_correct))

flag = '5432' b = 24 p = 1 p = 5 p = 20 p = 60 p = 120 flag = logical 0

7   Pass
x = 54321; y_correct = true; assert(isequal(is_pandigital(x),y_correct))

flag = '54321' b = 120 p = 1 p = 5 p = 20 p = 60 p = 120 p = 120 flag = logical 1

8   Pass
x = 2361457879; y_correct = false; assert(isequal(is_pandigital(x),y_correct))

flag = '2361457879' b = 3628800 p = 1 p = 2 p = 6 p = 36 p = 36 p = 144 p = 720 p = 5040 p = 40320 p = 282240 p = 2540160 flag = logical 0

9   Pass
x = 1234567809; y_correct = false; assert(isequal(is_pandigital(x),y_correct))

flag = '1234567809' b = 3628800 p = 1 p = 1 p = 2 p = 6 p = 24 p = 120 p = 720 p = 5040 p = 40320 p = 0 p = 0 flag = logical 0

10   Pass
x = 987654321; y_correct = true; assert(isequal(is_pandigital(x),y_correct))

flag = '987654321' b = 362880 p = 1 p = 9 p = 72 p = 504 p = 3024 p = 15120 p = 60480 p = 181440 p = 362880 p = 362880 flag = logical 1