Challenge: Last Digit of the Sum of Fibonacci Numbers’ Squares

Solve the Last Digit of the Sum of the Squares of Fibonacci Numbers Problem.

We'll cover the following

Problem


Last Digit of the Sum of the Squares of Fibonacci Numbers Problem

Compute the last digit of F02+F12++Fn2F^{2}_{0} + F^{2}_{1} + \cdot\cdot\cdot + F^{2}_{n}.

Input: An integer nn.

Output: The last digit of F02+F12++Fn2F^{2}_{0} + F^{2}_{1} + \cdot\cdot\cdot + F^{2}_{n}.


Level up your interview prep. Join Educative to access 70+ hands-on prep courses.