Cody

# Problem 1095. Circular Primes (based on Project Euler, problem 35)

Solution 1933146

Submitted on 12 Sep 2019 by Le Cong Hieu
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
[y numbers]=circular_prime(197) assert(isequal(y,16)&&isequal(numbers,[2 3 5 7 11 13 17 31 37 71 73 79 97 113 131 197]))

ans = [] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In circular_prime (line 3) In ScoringEngineTestPoint1 (line 1) In solutionTest (line 3)] y = 1 numbers = []

2   Pass
[y numbers]=circular_prime(100) assert(isequal(y,13)&&isequal(numbers,[2 3 5 7 11 13 17 31 37 71 73 79 97]))

ans = [] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In circular_prime (line 3) In ScoringEngineTestPoint2 (line 1) In solutionTest (line 5)] y = 1 numbers = []

3   Pass
[y numbers]=circular_prime(250) assert(isequal(y,17)&&isequal(numbers,[2 3 5 7 11 13 17 31 37 71 73 79 97 113 131 197 199]))

ans = [] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In circular_prime (line 3) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)] y = 1 numbers = []

4   Pass
[y numbers]=circular_prime(2000) assert(isequal(y,27)&&isequal(numbers,[2 3 5 7 11 13 17 31 37 71 73 79 97 113 131 197 199 311 337 373 719 733 919 971 991 1193 1931]))

ans = [] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In circular_prime (line 3) In ScoringEngineTestPoint4 (line 1) In solutionTest (line 9)] y = 1 numbers = []

5   Pass
[y numbers]=circular_prime(10000) assert(isequal(y,33)&&isequal(numbers,[2 3 5 7 11 13 17 31 37 71 73 79 97 113 131 197 199 311 337 373 719 733 919 971 991 1193 1931 3119 3779 7793 7937 9311 9377]))

ans = [] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In circular_prime (line 3) In ScoringEngineTestPoint5 (line 1) In solutionTest (line 11)] y = 1 numbers = []

6   Pass
[y numbers]=circular_prime(54321) assert(isequal(y,38)&&isequal(numbers,[2 3 5 7 11 13 17 31 37 71 73 79 97 113 131 197 199 311 337 373 719 733 919 971 991 1193 1931 3119 3779 7793 7937 9311 9377 11939 19391 19937 37199 39119]))

ans = [] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In circular_prime (line 3) In ScoringEngineTestPoint6 (line 1) In solutionTest (line 13)] y = 1 numbers = []