2807. Champernowne Constant

单点时限: 2.0 sec

内存限制: 256 MB

Champernown constant is an irrational number represented in decimal by “0.” followed by

concatenation of all positive integers in the increasing order. The first few digits of this constant are: 0.123456789101112 . . .

Your task is to write a program that outputs the K digits of Chapnernown constant starting at the N-th place for given two natural numbers K and N.

输入格式

The input has multiple lines. Each line has two positive integers N and K (N ≤ 109, K ≤ 100) separated by a space.

The end of input is indicated by a line with two zeros. This line should not be processed.

输出格式

For each line, output a line that contains the K digits.

样例

Input
4 5
6 7
0 0
Output
45678
6789101

21 人解决,46 人已尝试。

26 份提交通过,共有 204 份提交。

6.4 EMB 奖励。

创建: 14 年,6 月前.

修改: 7 年,2 月前.

最后提交: 7 年,5 月前.

来源: Japan

题目标签