Given piles of candies (each pile has a count) and k children, you may split piles but not merge them; every child must receive the same number of candies (you may discard leftovers). Return the maximum number of candies each child can get, or 0 if it is impossible to give each child at least one. Input: '[candies], k'.
Input: '[candies], k'.
Output: Integer — the maximum candies per child.
Input: [5,8,6], 3
Output: 5
Explanation: Each child can get 5.Input: [2,5], 11
Output: 0
Explanation: Not enough candies.Input: [10], 1
Output: 10
Explanation: One child takes all.1<=n<=10^51<=candy<=10^71<=k<=10^12