I have this problem where I want to find all the ways one can invest money over several items. I am doing this for a game and I thought it was an easy problem but I am stuck since it is not that easy...

Basically the problem is this:

You have a certain amount of money RP (specifically RP = 1360)

Find all the sets of items that you can buy with this RP.

For this specific example there are 6 items to buy, you can buy the same item more than once.

Item prices (for example): (975,520,487,260,244,130)

So for example, two distributions would be:

(0,0,0,0,0,10)

(0,0,0,1,0,8)

How do I solve this problem, possibly by writing a small code.

Thanks for your time.