Problem of the day
F(n) = F(n-1) + F(n-2),
Where, F(1) = F(2) = 1.
For βNβ = 5, the output will be 5.
The first line contains a single integer βTβ denoting the number of test cases to be run. Then the test cases follow.
The first line of each test case contains a single integer βNβ, representing the integer for which we have to find its equivalent Fibonacci number.
For each test case, print a single integer representing the Nβth Fibonacci number.
Return answer modulo 10^9 + 7.
Output for each test case will be printed in a separate line.
You are not required to print anything; it has already been taken care of. Just implement the function.
1 <= T <= 10
1 <= N <= 10^5
Time Limit: 1 sec.
2
10
7
55
13
For the first test case, the 10th Fibonacci number is 55.
For the second test case, the 7th Fibonacci number is 13.
2
1
3
1
2