#P1895. 数字序列
数字序列
Description
Define the function as writing the number in base as a string. For example, . Based on this,
- Define the string .
- Define the string .
For example, the beginning of is:
$$\tt 112123123412345123456123456712345678123456789123456789101234567891011\cdots$$Now, for a given , determine the character at position of .
Input Format
The first line contains a positive integer , the number of testcases.
The next lines each contain one positive integer , representing a query.
Output Format
For each , output the digit at the corresponding position.
2
3
8
2
2
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号