Pow 3 "a sticky gum" revisited

Gumballs are 1 penny each. The kids each want a different color. what is the maximum spent with each generalization. create formulas for the following.

Generalize the number of children. Generalize the number of gum ball each child wants. Generalize the number of gum balls of each color. Generalize the number of colors in the machine.