topic description
Input n integers, find the smallest k integers and output them in ascending order
enter
The first line enters two integers n and k
The second line enters an array of integers
output
Output the smallest k integers from small to large, separated by spaces
sample
enter
5 2
1 3 5 7 2
output
1 2
java code:
import java.util.*<