The Infinite Digit String
All positive integers are written in a row: 123456789101112131415... Print the K-th digit (1-indexed).
Input: one integer K.
Output: the K-th digit of the infinite string.
Constraints:
- 1 ≤ K ≤ 1018
Sample Tests
Input 1
11
Output 1
0
Input 2
3
Output 2
3
Discussion (opens after you solve — no spoilers before)
No comments yet.