the initial problem ask for the number of possible combination,
but in my initial version I try to find the exact possible combinations,
which result in memory limit exceed