시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 4 | 3 | 3 | 75.000% |
Given $k$ and $n$, find the $n$-th positive integer $x$ such that the decimal representation of $x\cdot\underbrace{999\ldots9}_k$ doesn't contain any $9$.
The only line contains two integers $k$ and $n$ ($1\le k\le 18$, $1\le n\le 10^{18}$).
Print the answer.
1 1
2
1 8
9
1 9
12
1 10
13
5 1
11112
5 84
11235
5 668
12345
5 733942
2281488
For $k = 1$, the sequence of all valid numbers starts with $2, 3, 4, 5, 6, 7, 8, 9, 12, 13, \ldots$