Cody

Solution 1882913

Submitted on 24 Jul 2019 by Dimas
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
nList = 28:6:76; for i = 1:length(nList) n = nList(i); [p1,p2] = goldbach(n) assert(isprime(p1) && isprime(p2) && (p1+p2==n)); end

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 28 p2 = 28 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 34 p2 = 34 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 40 p2 = 40 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 46 p2 = 46 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 52 p2 = 52 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 58 p2 = 58 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 64 p2 = 64 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 70 p2 = 70 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] p1 = 76 p2 = 76

2   Pass
nList = [18 20 22 100 102 114 1000 2000 36 3600]; for i = 1:length(nList) n = nList(i); [p1,p2] = goldbach(n) assert(isprime(p1) && isprime(p2) && (p1+p2==n)); end

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 18 p2 = 18 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 20 p2 = 20 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 22 p2 = 22 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 100 p2 = 100 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 102 p2 = 102 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 114 p2 = 114 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 1000 p2 = 1000 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 2000 p2 = 2000 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 36 p2 = 36 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In goldbach (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] p1 = 3600 p2 = 3600