Problem 42996. what can you get for exactly amount of money

You go to store, where each product has price. Prices are in vector

s = [ 195 125 260 440 395 290]

and you have amount of money n=570

Question is what can you buy, if you want to use whole amount of money

For this data answer is

y=[ 125 125 125 195]

With other data it can be more than one solution.

Solution Stats

44.49% Correct | 55.51% Incorrect
Last Solution submitted on Oct 29, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers90

Suggested Problems

More from this Author12

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!