Cody

Solution 2448335

Submitted on 1 Jun 2020 by Ramesh Kumar V
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))

sum = 2 n = 1 1 2 sum = 6 n = 1 1 2 3 sum = 15 n = 1 1 2 3 5 sum = 40 y = 40

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

sum = 2 n = 1 1 2 sum = 6 n = 1 1 2 3 sum = 15 n = 1 1 2 3 5 sum = 40 n = 1 1 2 3 5 8 sum = 104 n = 1 1 2 3 5 8 13 sum = 273 n = 1 1 2 3 5 8 13 21 sum = 714 y = 714

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

sum = 2 n = 1 1 2 sum = 6 n = 1 1 2 3 sum = 15 n = 1 1 2 3 5 sum = 40 n = 1 1 2 3 5 8 sum = 104 n = 1 1 2 3 5 8 13 sum = 273 n = 1 1 2 3 5 8 13 21 sum = 714 n = 1 1 2 3 5 8 13 21 34 sum = 1870 n = 1 1 2 3 5 8 13 21 34 55 sum = 4895 n = 1 1 2 3 5 8 13 21 34 55 89 sum = 12816 y = 12816

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

sum = 2 n = 1 1 2 sum = 6 n = 1 1 2 3 sum = 15 n = 1 1 2 3 5 sum = 40 n = 1 1 2 3 5 8 sum = 104 n = 1 1 2 3 5 8 13 sum = 273 n = 1 1 2 3 5 8 13 21 sum = 714 n = 1 1 2 3 5 8 13 21 34 sum = 1870 n = 1 1 2 3 5 8 13 21 34 55 sum = 4895 n = 1 1 2 3 5 8 13 21 34 55 89 sum = 12816 n = 1 1 2 3 5 8 13 21 34 55 89 144 sum = 33552 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 sum = 87841 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 sum = 229970 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 sum = 602070 y = 602070

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

sum = 2 n = 1 1 2 sum = 6 n = 1 1 2 3 sum = 15 n = 1 1 2 3 5 sum = 40 n = 1 1 2 3 5 8 sum = 104 n = 1 1 2 3 5 8 13 sum = 273 n = 1 1 2 3 5 8 13 21 sum = 714 n = 1 1 2 3 5 8 13 21 34 sum = 1870 n = 1 1 2 3 5 8 13 21 34 55 sum = 4895 n = 1 1 2 3 5 8 13 21 34 55 89 sum = 12816 n = 1 1 2 3 5 8 13 21 34 55 89 144 sum = 33552 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 sum = 87841 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 sum = 229970 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 sum = 602070 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 sum = 1576239 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 17 987 1597 sum = 4126648 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 18 987 1597 2584 sum = 10803704 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 19 987 1597 2584 4181 sum = 28284465 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 20 987 1597 2584 4181 6765 sum = 74049690 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 21 987 1597 2584 4181 6765 10946 sum = 193864606 y = 193864606

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

sum = 2 n = 1 1 2 sum = 6 n = 1 1 2 3 sum = 15 n = 1 1 2 3 5 sum = 40 n = 1 1 2 3 5 8 sum = 104 n = 1 1 2 3 5 8 13 sum = 273 n = 1 1 2 3 5 8 13 21 sum = 714 n = 1 1 2 3 5 8 13 21 34 sum = 1870 n = 1 1 2 3 5 8 13 21 34 55 sum = 4895 n = 1 1 2 3 5 8 13 21 34 55 89 sum = 12816 n = 1 1 2 3 5 8 13 21 34 55 89 144 sum = 33552 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 sum = 87841 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 sum = 229970 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 sum = 602070 n = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 sum = 1576239 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 17 987 1597 sum = 4126648 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 18 987 1597 2584 sum = 10803704 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 19 987 1597 2584 4181 sum = 28284465 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 20 987 1597 2584 4181 6765 sum = 74049690 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 21 987 1597 2584 4181 6765 10946 sum = 193864606 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 22 987 1597 2584 4181 6765 10946 17711 sum = 507544127 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 23 987 1597 2584 4181 6765 10946 17711 28657 sum = 1.3288e+09 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 24 987 1597 2584 4181 6765 10946 17711 28657 46368 sum = 3.4788e+09 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 25 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 sum = 9.1075e+09 n = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 26 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 sum = 2.3844e+10 y = 2.3844e+10