Cody

Problem 525. Mersenne Primes

Solution 2026339

Submitted on 18 Nov 2019 at 11:50
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
x = 3; y_correct = true; assert(isequal(isMersenne(x),y_correct))

Error in solution: Line: 8 Column: 4 Illegal use of reserved keyword "else".

2   Fail
x = 127; y_correct = true; assert(isequal(isMersenne(x),y_correct))

Error in solution: Line: 8 Column: 4 Illegal use of reserved keyword "else".

3   Fail
x = 157; y_correct = false; assert(isequal(isMersenne(x),y_correct))

Error in solution: Line: 8 Column: 4 Illegal use of reserved keyword "else".

4   Fail
x = 2047; y_correct = false; assert(isequal(isMersenne(x),y_correct))

Error in solution: Line: 8 Column: 4 Illegal use of reserved keyword "else".

5   Fail
x = 8191; y_correct = true; assert(isequal(isMersenne(x),y_correct))

Error in solution: Line: 8 Column: 4 Illegal use of reserved keyword "else".

6   Fail
x = 524287; y_correct = true; assert(isequal(isMersenne(x),y_correct))

Error in solution: Line: 8 Column: 4 Illegal use of reserved keyword "else".

7   Fail
x = 536870911; y_correct = false; assert(isequal(isMersenne(x),y_correct))

Error in solution: Line: 8 Column: 4 Illegal use of reserved keyword "else".