Cody

# Problem 2423. Integer Sequence - II : New Fibonacci

Solution 2036970

Submitted on 27 Nov 2019 by Payam Morsali
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
assert(isequal(newFibo(1),1))

k = 1 1 1 2 5 21 1 10946 5702887 y = 1

2   Pass
assert(isequal(newFibo(2),1))

k = 1 1 1 2 5 21 1 10946 5702887 y = 1

3   Pass
assert(isequal(newFibo(3),1))

k = 1 1 1 2 5 21 1 10946 5702887 y = 1

4   Pass
assert(isequal(newFibo(4),2))

k = 1 1 1 2 5 21 1 10946 5702887 y = 2

5   Pass
assert(isequal(newFibo(5),5))

k = 1 1 1 2 5 21 1 10946 5702887 y = 5

6   Pass
assert(isequal(newFibo(6),21))

k = 1 1 1 2 5 21 1 10946 5702887 y = 21

7   Pass
assert(isequal(newFibo(8),10946))

k = 1 1 1 2 5 21 1 10946 5702887 y = 10946

8   Pass
assert(isequal(newFibo(9),5702887))

k = 1 1 1 2 5 21 1 10946 5702887 y = 5702887

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!