https://ide.codingblocks.com/s/231149 . This code is passing only one test case.
The code is passing only one test case
hi @ayusdas2000,
instead of cout << fib(m + 2) - fib(n + 1) << endl;
you should have done cout << (fib(m + 2) - fib(n + 1)+MOD)%MOD << endl;
as fib(m + 2) - fib(n + 1) this might compute to negetive numbers
corrected code :- https://ide.codingblocks.com/s/268373
In case of any doubt feel free to ask
Mark your doubt as RESOLVED if you got the answer