Cody

# Problem 45234. Calculating large fibonacci numbers

Solution 2060817

Submitted on 17 Dec 2019 by Atsushi Ueno
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 = 100; y_correct = 21; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+20 * 5.7315 3.5422 3.5422 2.1892 ans = 21

2   Pass
x = 140; y_correct = 29; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+29 * 1.3115 0.8106 0.8106 0.5010 ans = 29

3   Pass
x = 200; y_correct = 41; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+41 * 4.5397 2.8057 2.8057 1.7340 ans = 41

4   Pass
x = 300; y_correct = 62; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+62 * 3.5958 2.2223 2.2223 1.3735 ans = 62

5   Pass
x = 400; y_correct = 83; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+83 * 2.8481 1.7602 1.7602 1.0879 ans = 83

6   Pass
x = 500; y_correct = 104; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+104 * 2.2559 1.3942 1.3942 0.8617 ans = 104

7   Pass
x = 1000; y_correct = 209; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+208 * 7.0330 4.3467 4.3467 2.6864 ans = 209

8   Pass
x = 1100; y_correct = 230; assert(isequal(your_fcn_name(x),y_correct))

fb = 1.0e+229 * 5.5707 3.4429 3.4429 2.1278 ans = 230

9   Pass
x = 1100; y_correct = 230; tic assert(isequal(your_fcn_name(x),y_correct)) time = toc assert(time < .01)

fb = 1.0e+229 * 5.5707 3.4429 3.4429 2.1278 ans = 230 time = 3.3000e-04

### Community Treasure Hunt

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

Start Hunting!