Given coin denominations (unlimited supply) and an amount, return the number of distinct combinations that make up the amount. Order does not matter. The input is JSON {amount, coins}.
Input: JSON {amount, coins}.
Output: Integer — the number of combinations.
Input: {"amount":5,"coins":[1,2,5]}
Output: 4
Explanation: Four combinations.Input: {"amount":4,"coins":[2]}
Output: 1
Explanation: 2+2.Input: {"amount":0,"coins":[1]}
Output: 1
Explanation: The empty combination.0<=amount<=50001<=coins<=12