SOLVE

LATER

Fibonacci Numbers

Problem

Editorial

Analytics

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

Explanation

fib[1] + fib[2] + fib[3] + fib[4] = 1 + 1 + 2 + 3 = 7.

Time Limit:
1.0 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Marking Scheme:
Marks are awarded when all the testcases pass.

Allowed Languages:
C,
C++,
C++14,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Julia,
Kotlin,
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Swift,
Swift-4.1,
Visual Basic

Initializing Code Editor...

{"4cf315f": "/pagelets/show-submission/algorithm/fibonacci-numbers-5/", "8308a8a": "/pagelets/recommended-problems/algorithm/fibonacci-numbers-5/", "987bef0": "/pagelets/problems-hint/algorithm/fibonacci-numbers-5/", "82d5ae5": "/pagelets/suggested-problems/algorithm/fibonacci-numbers-5/", "4c997d5": "/pagelets/problem-author-tester/algorithm/fibonacci-numbers-5/"}

realtime.hackerearth.com

80

d4b0fe12fd03a5e68e5d55fec6b8a1be27e4e3d7

58a29e5cae2309f04b28

/realtime/pusher/auth/