1518. Water Bottles
Easy
Last updated
Easy
Last updated
There are numBottles
water bottles that are initially full of water. You can exchange numExchange
empty water bottles from the market with one full water bottle.
The operation of drinking a full water bottle turns it into an empty bottle.
Given the two integers numBottles
and numExchange
, return the maximum number of water bottles you can drink.
Example 1:
Example 2:
Constraints:
1 <= numBottles <= 100
2 <= numExchange <= 100
Runtime: 0 ms, faster than 100.00%
Memory Usage: 1.9 MB, less than 97.96%