✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)Code #1.1Time complexity: O(n∗log(m)). Space complex
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)

# Code #1.1
Time complexity: $$O(n*log(m))$$. Space complexity: $$O(1)$$.
```python3
class Solution:
    def maximumCandies(self, a: List[int], k: int) -> int:
        return bisect_left(range(max(a)+1),1,1,key=lambda q:sum(v//q for v in a)<k)-1
```

# Code #1.2
Time complexity: $$O(n*log(m))$$. Space complexity: $$O(1)$$.
```python3
class Solution:
    def maximumCandies(self, a: List[int], k: int) -> int:
        return bisect_left(range(max(a)),1,key=lambda q:sum(v//-~q for v in a)<k)
```

(Disclaimer 2: code above is just a product of fantasy packed into one line, it is not considered as 'true' oneliners - please, remind about drawbacks only if you know how to make it better)
['Array', 'Binary Search', 'Python', 'Python3']