If Frequency of element < remaining choices , select all of these elements , else select only the number of elements required
toSelect = min ( remaining_choices , frequency ) NEW_LINE ans = ans * NCR ( frequency , toSelect ) NEW_LINE