Challenge: Last Digit of the Partial Sum of Fibonacci Numbers

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

We'll cover the following

Problem


Last Digit of the Partial Sum of Fibonacci Numbers

Compute the last digit of Fm+Fm+1++FnF_{m} + F_{m+1} + \cdot\cdot\cdot + F_{n}.

Input: Integers mnm \leq n.

Output: The last digit of Fm+Fm+1++FnF_{m} + F_{m+1} + \cdot\cdot\cdot + F_{n}.


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