Cody

Problem 46099. Identify full reptend primes

Solution 2779489

Submitted on 4 Aug 2020 by Tim
  • Size: 35
  • This is the leading solution.
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
n = 3; assert(~isFullReptendPrime(n))

2   Pass
n = 5; assert(~isFullReptendPrime(n))

3   Pass
n = 7; assert(isFullReptendPrime(n))

4   Pass
n = 19; assert(isFullReptendPrime(n))

5   Pass
n = 23; assert(isFullReptendPrime(n))

6   Pass
n = 47; assert(isFullReptendPrime(n))

7   Pass
n = 53; assert(~isFullReptendPrime(n))

8   Pass
n = 101; assert(~isFullReptendPrime(n))

9   Pass
n = 128; assert(~isFullReptendPrime(n))

10   Pass
n = 379; assert(isFullReptendPrime(n))

11   Pass
n = 1607; assert(isFullReptendPrime(n))

12   Pass
n = 9967; assert(isFullReptendPrime(n))

13   Pass
n = 9973; assert(~isFullReptendPrime(n))

14   Pass
n = 28513; assert(isFullReptendPrime(n))

15   Pass
n = 177217; assert(isFullReptendPrime(n))

16   Pass
n = 225457; assert(isFullReptendPrime(n))

17   Pass
n = 225547; assert(~isFullReptendPrime(n))

18   Pass
n = 308927; assert(isFullReptendPrime(n))

19   Pass
filetext = fileread('isFullReptendPrime.m'); reading = ~isempty(strfind(filetext, 'urlread')) || ~isempty(strfind(filetext, '001913')); assert(~reading, 'Illegal approach')

Suggested Problems

More from this Author48

Community Treasure Hunt

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

Start Hunting!