You start with an initial account balance of
You are given an integer purchaseAmount representing the cost of an item you want to buy.
When making the purchase, the amount charged is rounded to the nearest multiple of purchaseAmount is equidistant between two multiples of
Return an integer representing your remaining account balance after paying the rounded amount.
Constraints:
purchaseAmount
You start with an initial account balance of
You are given an integer purchaseAmount representing the cost of an item you want to buy.
When making the purchase, the amount charged is rounded to the nearest multiple of purchaseAmount is equidistant between two multiples of
Return an integer representing your remaining account balance after paying the rounded amount.
Constraints:
purchaseAmount