Sol
Code


# Code
```python []
class Solution(object):
    def maximumCandies(self, candies, k):
        """
        :type candies: List[int]
        :type k: int
        :rtype: int
        """
        if sum(candies) < k:
            return 0  
        
        low, high = 1, max(candies)
        res = 0

        while low <= high:
            mid = (low + high) // 2
            total_children = sum(c // mid for c in candies)

            if total_children >= k:
                res = mid 
                low = mid + 1 
            else:
                high = mid - 1  

        return res

```
['Python']