CS240 project Problem 4
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
Consider an infinite sequence of numbers consisting of all natural numbers arranged in ascending order. That is, consider the sequence . Let denote the 'th number in the sequence; \emph{e.g.} , etc.
Let be a given input value. Give an algorithm to compute the smallest index in where occurs. For example, if , then the index is 10, since , and no earlier substring of equals 101.
Format
Input
A string representing the value , with no more than 200 digits.
Output
he smallest positive integer for which $B_{1}=S_{k}, B_{2}=S_{k+1}, \ldots, B_{r}=S_{k+r-1}$ is true, where is the number of digits in .
Samples
input1 : 101
output1 : 10
input2 : 81
output2 : 27
CS240 project Problem
- Status
- Done
- Rule
- IOI
- Problem
- 5
- Start at
- 2023-5-16 10:00
- End at
- 2023-6-6 23:59
- Duration
- 518 hour(s)
- Host
- Partic.
- 92