Similar questions have been asked before, however in this case each of the bins may each have a different capacity. Example: There are $2$ possibilities to put $7$ objects into two bins of the size $5$ and $3$, respectively. Is there a formula that will result in the amount of ways this can be done given the number of objects and the bin sizes?
PS: I've already come up with a way on how to brute force this by simply checking all possible combinations and counting the valid ones. I was just wondering if there was an easier way to approach this.