Cody

Problem 1946. Fibonacci-Sum of Squares

Given the Fibonacci sequence defined by the following recursive relation,

  • F(n) = F(n-1) + F(n-2)
  • where F(1) = 1 and F(1) = 1

determine the sum of squares for the first "n" terms.

For example, n=5 --> 1^2 + 1^2 + 2^2 + 3^2 + 5^2 = 40.

  • INPUT n=5
  • OUTPUT S=40

Solution Stats

52.99% Correct | 47.01% Incorrect
Last solution submitted on Aug 07, 2019

Problem Comments

Solution Comments

Recent Solvers243

Suggested Problems

More from this Author1