2558. Take Gifts From the Richest Pile
## 思路
max heap
## Code
```python
class Solution:
def pickGifts(self, gifts: List[int], k: int) -> int:
max_heap = [-val for val in gifts]
heapq.heapify(max_heap)
for _ in range(k):
num = -heapq.heappop(max_heap)
heapq.heappush(max_heap, -isqrt(num))
return -sum(max_heap)
```