Problem #53
Harry and his Magical Boxes
There are 7 magical boxes each containing a label depicting a number. The labels of the boxes are given as 5, 2, 7, 8, 7, 4, 6. Harry Potter goes to each jar once and shouts a spell. When Harry shouts a spell near a box with label x he gets a random integer n from the box such that, 1<=n<=x. Thus he gets a collection of seven numbers by shouting once near each box. One such collection is 4, 2, 1, 2, 6, 4, 6. Two collections are same if one is a permutation of other. So 1, 2, 1, 1, 1, 1, 6 is same as 2, 1, 1, 1, 1, 1, 6. Now Harry expects you to tell the total number of different collections he can get by repeatedly performing this act.