I understood the concept .. please tell me the mistake in the code

@vinishthanai
Issue is with your return of lcm when query is out of bounds

Have a look at this code for reference
For TLE use reference variables and Fast IO

can u explain this with an example? I tried the code and it worked for my testcases

@vinishthanai
fib of 10^9 is very large and will get out of bound therefore find fib%mod in the fib array

i have already done mod in each step