Nth Fibonacci Number
Submissions: 26087   Accuracy:

30.44%

  Difficulty: Basic   Marks: 1

Given a positive integer N, find the Nth fibonacci number. Since the answer can be very large, print the answer modulo 1000000007.

Input:

The first line of input contains T denoting the number of testcases.Then each of the T lines contains a single positive integer N.

Output:

Output the Nth fibonacci number.

Constraints:

1<=T<=200
1<=N<=1000

Example:

Input:
3
1
2
5

Output:
1
1
5

** For More Input/Output Examples Use 'Expected Output' option **

Author: dipjal1996


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.