Fibonacci meets gcd.... the code is compiling but not showing any result when i submit it
@imavneet You need to use segment trees to solve the question.
It will also be using the property GCD(Fib(a),Fib(b))=fib(GCD(a,b))
Create a segment tree on A use the property stated above and apply matrix exponentiation to find the required Fib() number.
If this resolves your doubt mark it as resolved.