Your task is simple enough calculate the Nth digit in the representation of Pi .
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.
For each test case output a single line containing the Nth digit in the representation of Pi .
Value of Pi is 3.14……
So first 3 digits are 3, 1 and 4
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.