Lexicographical order
Medium
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
We assume that one positive integer is lexicographically smaller than the other, if their symbol representation in decimal system in the same order
Find the k-th number in lexicographical sorted order of all integer from 1 to n inclusively.
Input
The first line contains two numbers n and k (1 ≤ k ≤ n ≤ 10^9
).
Output
Print one number - the k-th element in lexicographical order of all integer from 1 to n inclusively.
Examples
Input #1
Answer #1
Submissions 417
Acceptance rate 11%