Cody

# Problem 44481. How many Fibonacci numbers?

Solution 1888520

Submitted on 31 Jul 2019 by Nikolaos Nikolaou
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
x = [1 4 5 7 10 11 13 20 21 23 29]; y_correct = 4; assert(isequal(fib_count(x),y_correct))

t = 0 s = Columns 1 through 15 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 Columns 16 through 29 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 y = 4

2   Pass
x = 5:5:100; y_correct = 2; assert(isequal(fib_count(x),y_correct))

t = 0 s = Columns 1 through 15 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 Columns 16 through 29 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 y = 2

3   Pass
%x = [2 2 3 3 3 3 3 3 5 5 6 6 6 7 86168291600238450732788312165664788095941068326060883324529903470149056115823592713458328176574447204501]; % Changed the test suite to a number that can be represented as an integer in DOUBLE x = [2 2 3 3 3 3 3 3 5 5 6 6 6 7 8944394323791465]; y_correct = 3; assert(isequal(fib_count(x),y_correct))

t = 0 s = Columns 1 through 15 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 Columns 16 through 29 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 y = 3

4   Pass
x = [2 2 3 3 3 3 3 3 5 5 6 6 6 7 8944394323791464]; y_correct = 4; assert(isequal(fib_count(x),y_correct))

t = 0 t = 1 s = Columns 1 through 15 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 Columns 16 through 29 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 y = 4