题解 | #排序#
输入n个整数,输出其中最小的k个
http://www.nowcoder.com/practice/69ef2267aafd4d52b250a272fd27052c
while True:
try:
str1=input().split()
str2=input().split()
#str2=list(map(int,str2))
len=int(str1[0])
num=int(str1[1])
str2 = list(map(int,str2))
str2.sort()
i=0
#print(type(len))
for each in str2:
if i<num:
print(each,end=" ")
i=i+1
#str2= [int(x) for x in str2]
#c=str2.sort()
#str3=input()
print("")
except:break