Cody

Solution 1872602

Submitted on 12 Jul 2019
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   Fail
n = 1e2; y_correct = 3; f_correct = 3/25; [y,f] = Mersenne_prime_comp(n); assert(isequal(y,y_correct)) assert(isequal(f,f_correct))

out = 97 101

Output argument "y" (and maybe others) not assigned during call to "Mersenne_prime_comp". Error in Test1 (line 4) [y,f] = Mersenne_prime_comp(n);

2   Fail
n = 1e3; y_correct = 4; f_correct = 0.023809523809524; [y,f] = Mersenne_prime_comp(n); assert(isequal(y,y_correct)) assert(abs(f-f_correct)<(10*eps))

out = 997 1009

Output argument "y" (and maybe others) not assigned during call to "Mersenne_prime_comp". Error in Test2 (line 4) [y,f] = Mersenne_prime_comp(n);

3   Fail
n = 1e4; y_correct = 5; f_correct = 0.004068348250610; [y,f] = Mersenne_prime_comp(n); assert(isequal(y,y_correct)) assert(abs(f-f_correct)<(10*eps))

out = 9973 10007

Output argument "y" (and maybe others) not assigned during call to "Mersenne_prime_comp". Error in Test3 (line 4) [y,f] = Mersenne_prime_comp(n);

4   Fail
n = 1e5; y_correct = 5; f_correct = 5.212677231025855e-04; [y,f] = Mersenne_prime_comp(n); assert(isequal(y,y_correct)) assert(abs(f-f_correct)<(10*eps))

out = 99991 100003

Output argument "y" (and maybe others) not assigned during call to "Mersenne_prime_comp". Error in Test4 (line 4) [y,f] = Mersenne_prime_comp(n);

5   Fail
n = 1e6; y_correct = 7; f_correct = 8.917424647761727e-05; [y,f] = Mersenne_prime_comp(n); assert(isequal(y,y_correct)) assert(abs(f-f_correct)<(10*eps))

out = 999983 1000003

Output argument "y" (and maybe others) not assigned during call to "Mersenne_prime_comp". Error in Test5 (line 4) [y,f] = Mersenne_prime_comp(n);