-- coding:utf-8 -- class Solution: def GetLeastNumbers_Solution(self, tinput, k): # write code here import heapq if len(tinput) <= k: return tinput hp = [] for item in tinput: if len(hp) < k: heapq.heappush(hp, -item) else: ...