This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 5;
S = 40;
assert(isequal(FibSumSquares(n),S))
S =
1 1 2
S =
1 1 2 3
S =
1 1 2 3 5
ans =
40
|
2 | Pass |
%%
n = 11;
S = 12816;
assert(isequal(FibSumSquares(n),S))
S =
1 1 2
S =
1 1 2 3
S =
1 1 2 3 5
S =
1 1 2 3 5 8
S =
1 1 2 3 5 8 13
S =
1 1 2 3 5 8 13 21
S =
1 1 2 3 5 8 13 21 34
S =
1 1 2 3 5 8 13 21 34 55
S =
1 1 2 3 5 8 13 21 34 55 89
ans =
12816
|
3076 Solvers
1093 Solvers
Back to basics 8 - Matrix Diagonals
782 Solvers
Getting the indices from a vector
3212 Solvers
Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
168 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!