Cody

Problem 47073. Find the nth Fibbinary number

Solution 3381163

Submitted on 25 Oct 2020 at 21:02 by William
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 = 0; y_correct = 0; assert(isequal(Fibbinary(n),y_correct))

2   Pass
n = 4; y_correct = 5; assert(isequal(Fibbinary(n),y_correct))

3   Pass
n = 7; y_correct = 10; assert(isequal(Fibbinary(n),y_correct))

4   Pass
n = 77; y_correct = 321; assert(isequal(Fibbinary(n),y_correct))

5   Pass
n = 777; y_correct = 9282; assert(isequal(Fibbinary(n),y_correct))

6   Pass
n = 5000; y_correct = 140562; assert(isequal(Fibbinary(n),y_correct))

7   Pass
n = 7777; y_correct = 278597; assert(isequal(Fibbinary(n),y_correct))

8   Pass
n = 77777; y_correct = 8455236; assert(isequal(Fibbinary(n),y_correct))

9   Pass
n = 100000; y_correct = 9704021; assert(isequal(Fibbinary(n),y_correct))

Suggested Problems

More from this Author50

Community Treasure Hunt

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

Start Hunting!