当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1863:Subnumber

题目描述
George likes arithmetics very much. Especially he likes the natural numbers series. His most favourite thing is the infinite sequence of digits, which results as the concatenation of all natural numbers in ascending order. The beginning of this sequence is 1234567891011121314... Let us call this sequence S. Then S[1] = 1, S[2] = 2, ..., S[10] = 1, S[11] = 0, ... , and so on.
George takes a sequence of digits A and wants to know when it first appears in S. Help him to solve this difficult problem.
输入解释
The first line of the input file contains A - the given sequence of digits. The number of digits in A does not exceed 200. There are no spaces in the input file.
输出解释
Output file must contain the only number - the least k such that A[1] = S[k], A[2] = S[k+1], ... A[len(A)] = S[k + len(A) – 1], where len(A) denotes the length of A (i.e. the number of digits in it).
输入样例
101
输出样例
10

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-1863

最后修改于 2020-10-29T06:16:08+00:00 由爬虫自动更新

共提交 2

通过率 0.0%
时间上限 内存上限
1000 30000