Python3 代码
class Solution(object):
def getLeastNumbers_Solution(self, input, k):
"""
:type input: list[int]
:type k: int
:rtype: list[int]
"""
input.sort()
re = [0]*k
for i in range(k):
re[i] = input[i]
return re