Time limit
2s
Memory limit
64 MB
Write all integers from 1 through N in order, without spaces, to form one long digit string.
1234567891011121314151617181920212223...
Find the digit that appears in the k-th position from the beginning of this string.
The first line contains two integers N and k, separated by one or more spaces.
If the concatenated string is shorter than k digits, print -1. Otherwise, print the digit at the k-th position from the beginning.