Cody

Solution 1856203

Submitted on 23 Jun 2019 by Emre Kocer
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
n = 1; f = 1; assert(isequal(fib(n),f))

f = 1 1

2   Pass
n = 6; f = 8; assert(isequal(fib(n),f))

x = 1 1 2 i = 3 x = 1 1 2 3 i = 4 x = 1 1 2 3 5 i = 5 x = 1 1 2 3 5 8 i = 6 f = 8 8

3   Pass
n = 10; f = 55; assert(isequal(fib(n),f))

x = 1 1 2 i = 3 x = 1 1 2 3 i = 4 x = 1 1 2 3 5 i = 5 x = 1 1 2 3 5 8 i = 6 x = 1 1 2 3 5 8 13 i = 7 x = 1 1 2 3 5 8 13 21 i = 8 x = 1 1 2 3 5 8 13 21 34 i = 9 x = 1 1 2 3 5 8 13 21 34 55 i = 10 f = 55 55

4   Pass
n = 20; f = 6765; assert(isequal(fib(n),f))

x = 1 1 2 i = 3 x = 1 1 2 3 i = 4 x = 1 1 2 3 5 i = 5 x = 1 1 2 3 5 8 i = 6 x = 1 1 2 3 5 8 13 i = 7 x = 1 1 2 3 5 8 13 21 i = 8 x = 1 1 2 3 5 8 13 21 34 i = 9 x = 1 1 2 3 5 8 13 21 34 55 i = 10 x = 1 1 2 3 5 8 13 21 34 55 89 i = 11 x = 1 1 2 3 5 8 13 21 34 55 89 144 i = 12 x = 1 1 2 3 5 8 13 21 34 55 89 144 233 i = 13 x = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 i = 14 x = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 i = 15 x = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 i = 16 x = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 17 610 987 1597 i = 17 x = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 18 610 987 1597 2584 i = 18 x = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 19 610 987 1597 2584 4181 i = 19 x = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 20 610 987 1597 2584 4181 6765 i = 20 f = 6765 6765

Suggested Problems

More from this Author95