News

# Given integers n and k, find the lexicographically k-th smallest integer in the range from 1 to n. # Note: 1 <= k <= n <= 109 ...