#T323. 最小新整数
最小新整数
Description
Given a decimal positive integer n (0 < n < 1,000,000,000), where none of its digits are 0. The number of digits in n is m. Now, delete k digits (0 < k < m) from the m digits, and find the smallest possible new integer formed. For example: n = 9128456, k = 2, then the smallest new integer formed is 12456.
Input Format
The first line contains t, indicating the number of test cases; The next t lines each represent a test case, where each test case consists of two numbers n and k.
Output Format
t lines, each containing a number representing the smallest integer obtained after deleting k digits from n.
2
9128456 2
1444 3
12456
1