Cody

# Problem 232. Project Euler: Problem 2, Sum of even Fibonacci

Solution 1741446

Submitted on 3 Mar 2019 by Mark McBroom
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 =4000000 y_correct = 4613732; assert(isequal(euler002(x),y_correct))

x = 4000000 y: 0 xfib: 2 y1: 2 y: 2 xfib: 8 y1: 10 y: 10 xfib: 34 y1: 44 y: 44 xfib: 144 y1: 188 y: 188 xfib: 610 y1: 798 y: 798 xfib: 2584 y1: 3382 y: 3382 xfib: 10946 y1: 14328 y: 14328 xfib: 46368 y1: 60696 y: 60696 xfib: 196418 y1: 257114 y: 257114 xfib: 832040 y1: 1089154 y: 1089154 xfib: 3524578 y1: 4613732

2   Pass
x =97455000 y_correct = 82790070; assert(isequal(euler002(x),y_correct))

x = 97455000 y: 0 xfib: 2 y1: 2 y: 2 xfib: 8 y1: 10 y: 10 xfib: 34 y1: 44 y: 44 xfib: 144 y1: 188 y: 188 xfib: 610 y1: 798 y: 798 xfib: 2584 y1: 3382 y: 3382 xfib: 10946 y1: 14328 y: 14328 xfib: 46368 y1: 60696 y: 60696 xfib: 196418 y1: 257114 y: 257114 xfib: 832040 y1: 1089154 y: 1089154 xfib: 3524578 y1: 4613732 y: 4613732 xfib: 14930352 y1: 19544084 y: 19544084 xfib: 63245986 y1: 82790070

3   Pass
x =597455000 y_correct = 350704366; assert(isequal(euler002(x),y_correct))

x = 597455000 y: 0 xfib: 2 y1: 2 y: 2 xfib: 8 y1: 10 y: 10 xfib: 34 y1: 44 y: 44 xfib: 144 y1: 188 y: 188 xfib: 610 y1: 798 y: 798 xfib: 2584 y1: 3382 y: 3382 xfib: 10946 y1: 14328 y: 14328 xfib: 46368 y1: 60696 y: 60696 xfib: 196418 y1: 257114 y: 257114 xfib: 832040 y1: 1089154 y: 1089154 xfib: 3524578 y1: 4613732 y: 4613732 xfib: 14930352 y1: 19544084 y: 19544084 xfib: 63245986 y1: 82790070 y: 82790070 xfib: 267914296 y1: 350704366

4   Pass
x =666576 y_correct = 257114; assert(isequal(euler002(x),y_correct))

x = 666576 y: 0 xfib: 2 y1: 2 y: 2 xfib: 8 y1: 10 y: 10 xfib: 34 y1: 44 y: 44 xfib: 144 y1: 188 y: 188 xfib: 610 y1: 798 y: 798 xfib: 2584 y1: 3382 y: 3382 xfib: 10946 y1: 14328 y: 14328 xfib: 46368 y1: 60696 y: 60696 xfib: 196418 y1: 257114