You are given an integer total representing an amount of money, and two integers cost1 and cost2 representing the price of a pen and a pencil, respectively.
Return the number of distinct ways to purchase some number of pens and pencils such that the total cost spent does not exceed total. You may purchase
Constraints:
total, cost1, cost2
You are given an integer total representing an amount of money, and two integers cost1 and cost2 representing the price of a pen and a pencil, respectively.
Return the number of distinct ways to purchase some number of pens and pencils such that the total cost spent does not exceed total. You may purchase
Constraints:
total, cost1, cost2