Cody

Problem 1946. Fibonacci-Sum of Squares

Solution 838076

Submitted on 25 Feb 2016 by William
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
n = 5; S = 40; assert(isequal(FibSumSquares(n),S))

a = 0 1 1 a = 0 1 1 2 a = 0 1 1 2 3 a = 0 1 1 2 3 5

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

a = 0 1 1 a = 0 1 1 2 a = 0 1 1 2 3 a = 0 1 1 2 3 5 a = 0 1 1 2 3 5 8 a = 0 1 1 2 3 5 8 13 a = 0 1 1 2 3 5 8 13 21 a = 0 1 1 2 3 5 8 13 21 34 a = 0 1 1 2 3 5 8 13 21 34 55 a = 0 1 1 2 3 5 8 13 21 34 55 89

Suggested Problems

Community Treasure Hunt

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

Start Hunting!