Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Given:
- A big number ~N~ with the length not greater than ~10^5~ and its digits from ~1...9~ .
- A positive integer number ~K~ ~(K \leq 10^5)~.
Requirement: Create a number ~X~ formed by selecting ~K~ digits from the number ~N~ in the original order to create the smallest possible number.
Input
- The first line contains a number ~K~.
- The second line contains a big number ~N~.
Output
- The smallest possible number.
Sample Input
3
89678982
Sample Output
672
Bình luận