BETA

Submissions : 500 Accuracy :

0.2

Nth digit of pi
     


Your task is simple enough calculate the Nth digit in the representation of Pi .

Input:

The first line of input contains an integer T denoting the number of test cases.

Each line of test case contains an integer N as described in the problem statement.

Output:

For each test case output a single line containing the Nth digit in the representation of Pi .


Constraints:

1<=T<=1000

1<=N<= 99990

Example:

Input:

3

1

2

3

Output:

3

1

4

Explanation:

Value of Pi is 3.14……

So first 3 digits are 3, 1 and 4

**For More Examples Use Expected Output**


Contributor: Pranay Pandey

Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



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