Cody

Problem 42841. Return the sequence element III

Solution 2635489

Submitted on 30 Jun 2020
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
x1 = 1; x2 = 2; n = 5; y_correct = 6; assert(isequal(ulam(x1,x2,n),y_correct))

a = 1 2 a = 4 4 a = 4 4 a = 4 4 a = 4 4 s = 1 2 1

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test1 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

2   Fail
x1 = 1; x2 = 2; n = 22; y_correct = 77; assert(isequal(ulam(x1,x2,n),y_correct))

a = 1 2 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 a = 4 4 s = 1 2 1

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test2 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

3   Fail
x1 = 1; x2 = 3; n = 49; y_correct = 212; assert(isequal(ulam(x1,x2,n),y_correct))

a = 1 3 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 a = 5 5 s = 1 3 1

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test3 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

4   Fail
x1 = 1; x2 = 5; n = 10; y_correct = 22; assert(isequal(ulam(x1,x2,n),y_correct))

a = 1 5 a = 7 7 a = 7 7 a = 7 7 a = 7 7 a = 7 7 a = 7 7 a = 7 7 a = 7 7 a = 7 7 s = 1 5 1

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test4 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

5   Fail
x1 = 2; x2 = 9; n = 8; y_correct = 20; assert(isequal(ulam(x1,x2,n),y_correct))

a = 2 9 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 s = 2 9 2

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test5 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

6   Fail
x1 = 2; x2 = 9; n = 26; y_correct = 77; assert(isequal(ulam(x1,x2,n),y_correct))

a = 2 9 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 s = 2 9 2

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test6 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

7   Fail
x1 = 4; x2 = 5; n = 29; y_correct = 123; assert(isequal(ulam(x1,x2,n),y_correct))

a = 4 5 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 a = 13 13 s = 4 5 4

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test7 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

8   Fail
x1 = 6; x2 = 7; n = 29; y_correct = 123; assert(isequal(ulam(x1,x2,n),y_correct))

a = 6 7 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 a = 19 19 s = 6 7 6

Output argument "y" (and maybe others) not assigned during call to "ulam". Error in Test8 (line 5) assert(isequal(ulam(x1,x2,n),y_correct))

Suggested Problems

More from this Author34