Minimum Money needed all testcases wrong

Please tell me what I am doing wrong.

Please try to code DP solutions in a bottom-up fashion. And your solution doesn’t look like it’s correct to me. There is just 1 state of dp in your entire program i.e. the weight left. Where is the index of the element to be included as a state of DP?