Regarding this problem


sir this is a hackerblock problem
https://hack.codingblocks.com/app/practice/3/227/problem

@sraj39273 your code will get tle as 10^9 operations are too much and you need to calculate sum of fibonachi numbers by somthing else
S(n)=F(n+2) -1
this is for sum of first n fibonachi numbers and f(n+2) denotes the n+2th fibonachi number
now your answer is s(m) - s(n)
to calculate fibonachi numbers in log n time using matrix exponentiation method
Coding Blocks IDE
please study that method first and then see this code it will work fine
and if issue clear rate my experience

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.