Cody

Solution 1977844

Submitted on 15 Oct 2019 by Joseph Chambers
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 = 5; S = 40; assert(isequal(FibSumSquares(n),S))

fib = 1 1 4 9 25 S = 40

2   Pass
n = 8; S = 714; assert(isequal(FibSumSquares(n),S))

fib = 1 1 4 9 25 64 169 441 S = 714

3   Pass
n = 11; S = 12816; assert(isequal(FibSumSquares(n),S))

fib = 1 1 4 9 25 64 169 441 1156 3025 7921 S = 12816

4   Pass
n = 15; S = 602070; assert(isequal(FibSumSquares(n),S))

fib = 1 1 4 9 25 64 169 441 1156 3025 7921 20736 54289 142129 372100 S = 602070

5   Pass
n = 21; S = 193864606; assert(isequal(FibSumSquares(n),S))

fib = Columns 1 through 15 1 1 4 9 25 64 169 441 1156 3025 7921 20736 54289 142129 372100 Columns 16 through 21 974169 2550409 6677056 17480761 45765225 119814916 S = 193864606

6   Pass
n = 26; S = 23843770274; assert(isequal(FibSumSquares(n),S))

fib = 1.0e+10 * Columns 1 through 18 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0003 0.0007 Columns 19 through 26 0.0017 0.0046 0.0120 0.0314 0.0821 0.2150 0.5629 1.4736 S = 2.3844e+10