{"raw_statement":[{"iden":"statement","content":"Consider the following constant: $$\\varphi = \\dfrac{9}{10} \\cdot \\dfrac{99}{100} \\cdot \\dfrac{999}{1000} \\cdot \\dfrac{9999}{10000}\\cdot \\dots$$\n\nYou have to find the $n$-th digit after the decimal separator in the decimal representation of $phi.alt$.\n\nThe first line of input contains a single integer $t$ ($1 <= t <= 10^5$) which is the number of test cases.\n\nThe next line contains $t$ integers $n$ ($1 <= n <= 10^(18)$), one for each test case.\n\nFor each test case, output a single digit which is the answer to that test case. Separate consecutive answers by single spaces.\n\nThe constant evaluates as $phi.alt = 0. 890010099998999 \\\\dots$\n\n"},{"iden":"input","content":"The first line of input contains a single integer $t$ ($1 <= t <= 10^5$) which is the number of test cases.The next line contains $t$ integers $n$ ($1 <= n <= 10^(18)$), one for each test case."},{"iden":"output","content":"For each test case, output a single digit which is the answer to that test case. Separate consecutive answers by single spaces."},{"iden":"note","content":"The constant evaluates as $phi.alt = 0. 890010099998999 \\\\dots$"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $\\varphi = \\prod_{k=1}^{\\infty} \\left(1 - 10^{-k}\\right)$.\n\n**Constraints**  \n1. $1 \\le t \\le 10^5$  \n2. For each test case, $1 \\le n \\le 10^{18}$\n\n**Objective**  \nFor each test case, find the $n$-th digit after the decimal point in the decimal expansion of $\\varphi$.","simple_statement":"Find the n-th digit after the decimal point in the decimal expansion of φ = (9/10) × (99/100) × (999/1000) × ..., where n can be up to 10^18.","has_page_source":false}