Practice Distribute Money to Maximum Children
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Distribute all money among children using integer dollar amounts. Every child must receive at least 1 dollar, and no child may receive exactly 4 dollars. Maximize the number receiving exactly 8 dollars and return that count, or -1 if no valid distribution exists.
Source: Distribute Money to Maximum Children on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
money = 20, children = 3
Output
1
# Example 2
Input
money = 16, children = 2
Output
2
Constraints
1 <= money <= 200
2 <= children <= 30
Related LeetCode Problems
Practice more problems similar to Distribute Money to Maximum Children.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.