nth digit of Fibonacci
Submissions: 930   Accuracy:

41.55%

  Difficulty: Basic   Marks: 1

A Fibonacci series (starting from 1) written in order without any spaces in between, thus producing a sequence of digits. Find the Nth digit in the sequence.

Input:
First line of input contains number of test cases T. Each line of test case contain a number N.

Output:
Display the Nth digit in the sequence.

Constraints:
1 <=T<= 30
1 <= N<= 100

Example:

Input:
3
10
3
25

Output:
1
2
7

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

Author: atharv


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



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


to report an issue on this page.