Cody

Solution 2041378

Submitted on 2 Dec 2019 by Asif Newaz
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
A = 4; B = 10; y_correct = 5; assert(isequal(fermat(A,B),y_correct))

c = 5 c = 5 5 C = 5

2   Pass
A = 20; B = 10; y_correct = [5 10 13 15 17]; assert(isequal(fermat(A,B),y_correct))

c = 5 c = 5 5 c = 5 5 10 c = 5 5 10 10 c = 5 5 10 10 13 c = 5 5 10 10 13 15 c = 5 5 10 10 13 15 17 C = 5 10 13 15 17

3   Pass
A = 20; B = 30; y_correct = [ 5 10 13 15 17 20 25 26 29 30 34]; assert(isequal(fermat(A,B),y_correct))

c = 5 c = 5 5 c = 5 5 13 c = 5 5 13 10 c = 5 5 13 10 25 c = 5 5 13 10 25 10 c = 5 5 13 10 25 10 17 c = 5 5 13 10 25 10 17 15 c = 5 5 13 10 25 10 17 15 26 c = 5 5 13 10 25 10 17 15 26 13 c = 5 5 13 10 25 10 17 15 26 13 15 c = 5 5 13 10 25 10 17 15 26 13 15 20 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 20 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 20 34 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 20 34 30 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 20 34 30 25 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 20 34 30 25 29 C = 5 10 13 15 17 20 25 26 29 30 34

4   Pass
A = 17; B = 33; y_correct = [5 10 13 15 17 20 25 26 34]; assert(isequal(fermat(A,B),y_correct))

c = 5 c = 5 5 c = 5 5 13 c = 5 5 13 10 c = 5 5 13 10 25 c = 5 5 13 10 25 10 c = 5 5 13 10 25 10 17 c = 5 5 13 10 25 10 17 15 c = 5 5 13 10 25 10 17 15 26 c = 5 5 13 10 25 10 17 15 26 13 c = 5 5 13 10 25 10 17 15 26 13 15 c = 5 5 13 10 25 10 17 15 26 13 15 20 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 20 c = 5 5 13 10 25 10 17 15 26 13 15 20 17 25 20 34 C = 5 10 13 15 17 20 25 26 34

Suggested Problems

More from this Author11