Fibonacci Numbers
Practice
3.3 (3 votes)
Easy
Problem
41% Success 2357 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Find summation of Fibonacci numbers from l to r mod 99991. Precisely find (fib(l) + fib(l+1) + ..... + fib(r) ) mod 99991.
Initial conditions for Fibonacci numbers is defined as follows :
fib(0) = 0 , fib(1) = 1
Input Format
Input contains a single line containing two space separated integers l and r.
Output Format
Output single integer denoting the answer.
Constraints :
0<=l<=r<=10^18
Setter : Aayush Kapadia
Submissions
Please login to view your submissions
Similar Problems
Points:20
1 votes
Tags:
Easy
Editorial