Champernowne Constant
Time limit8sMemory limit512 MB
For each query, print the K digits of the Champernowne constant starting at decimal position N, where integers are concatenated in order.
- Level
Medium5 of 10
- Topics
- Math, String matching, Implementation
- Solved
- No attempts yet
Problem
The Champernowne constant is the irrational number whose decimal expansion is every positive integer written out in increasing order, concatenated after the decimal point. It begins like this.
Given two natural numbers and , write a program that prints the digits of this constant starting at decimal place .
Input
The input has several lines. Each line holds two positive integers and separated by one space, with and .
The end of the input is a line holding two zeros. Do not process that line.
Output
For each line, print the digits on one line with no separators.