#P1511. [SDOI2006] 数字串位置 / 超长数字串
[SDOI2006] 数字串位置 / 超长数字串
Description
What he likes most is the infinite sequence of digits formed by writing all natural numbers in ascending order. This sequence begins as:
We call this sequence , and , , ... , , , and so on.
George has a digit sequence , and he wants to know the earliest position where this sequence appears in . Please help him solve this problem.
Input Format
Input a single string representing the digit sequence A, with length at most 200, and no spaces.
Output Format
Output the smallest positive integer such that $A_1 = S_k, A_2 = S_{k+1}, ...,A_{len_{A}} = S_{k + len(A)-1}$ holds, where len_{A} denotes the length of sequence A.
101
10
Hint
Source
Ural State University Problem Archive.
Translated by ChatGPT 5
京公网安备 11011102002149号