You want to hand out candies to the participants of an algorithm camp.
You have N candies, and every candy has a brand written as an integer.
First you decide K, the number of candies you hand out. Then you pick exactly one candy of each brand from brand 1 through brand K.
K can be any value from 1 to N, and two candies of the same brand count as different candies. Write a program that computes the total number of ways to pick the candies, summed over every K.