Solution for TPC challenge-1 (coin-change problem

The solution is using