### PROBLEM LINK

### DIFFICULTY

EASY

### PROBLEM

If a and b are the first two Fibonacci numbers what will be the rth number.

### EXPLANATION

To calculate the rth fibonnaci number we need to precompute using matrix multiplication.

Case 1:

If r=1 answer is a

If r=2 answer is b

Else

So we need to pre compute for every r.