Testing Round 15 (Unrated)
翻译中…
Let's write all the positive integer numbers one after another from $1$ without any delimiters (i.e. as a single string). It will be the infinite sequence starting with 123456789101112131415161718192021222324252627282930313233343536...
翻译中…
Your task is to print the $k$-th digit of this sequence.
翻译中…
Input
翻译中…
The first and only line contains integer $k$ ($1 \le k \le 10^{12}$) — the position to process ($1$-based index).
翻译中…
Output
翻译中…
Print the $k$-th digit of the resulting infinite sequence.
翻译中…
样例
Input #1
7
Output #1
7
InputCopy
OutputCopy
Input #2
21
Output #2
5
InputCopy
OutputCopy
题目信息
标签
二分
分治
模拟
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。