On Jan 27, 3:45  ꮮ 
> Hi, my solution is a lot simpler than most posted so far
>
> As the aim is to find only the optimum solution all I do is
> working with the largest coin first find out the maximum number of those
> we can use
> and then the next largest and so on which self-evidently is the optimal
> solution.

If you're trying to make 14 from the coins [10, 7, 2], a test case
previously posted, then the optimal solution would be [7, 7], but
yours would produce [10, 2, 2].  And your program throws an exception
when you try to make 21 from those same coins, even though there is a
valid solution of [7, 7, 7].

The other submitters didn't make their solutions complex for some love
of complexity....

Eric