#P473. 练85.3 删数问题(Noip1994)
练85.3 删数问题(Noip1994)
Description
Given a high-precision positive integer , remove any digits from it, and form a new positive integer with the remaining digits in their original order. Write a program to find a solution that makes the new number as small as possible for given and .
Output the new positive integer. ( has at most digits)
No error checking is required for the input data.
Input Format
The input consists of two lines. The first line contains , and the second line contains .
Output Format
The smallest possible number after removing digits.
Sample
175438
413