CoolFace
Datasetpublic

FPEvalDataset/LeetCodeProblem

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes305downloads
meta.json97 linesDownload Raw Back to water_bottles_ii
1{2    "id": 3336,3    "name": "water_bottles_ii",4    "difficulty": "Medium",5    "link": "https://leetcode.com/problems/water-bottles-ii/",6    "date": "2024-03-24 00:00:00",7    "task_description": "You are given two integers `numBottles` and `numExchange`. `numBottles` represents the number of full water bottles that you initially have. In one operation, you can perform one of the following operations: Drink any number of full water bottles turning them into empty bottles. Exchange `numExchange` empty bottles with one full water bottle. Then, increase `numExchange` by one. Note that you cannot exchange multiple batches of empty bottles for the same value of `numExchange`. For example, if `numBottles == 3` and `numExchange == 1`, you cannot exchange `3` empty water bottles for `3` full bottles. Return _the **maximum** number of water bottles you can drink_. **Example 1:** ``` **Input:** numBottles = 13, numExchange = 6 **Output:** 15 **Explanation:** The table above shows the number of full water bottles, empty water bottles, the value of numExchange, and the number of bottles drunk. ``` **Example 2:** ``` **Input:** numBottles = 10, numExchange = 3 **Output:** 13 **Explanation:** The table above shows the number of full water bottles, empty water bottles, the value of numExchange, and the number of bottles drunk. ``` **Constraints:** `1 <= numBottles <= 100 ` `1 <= numExchange <= 100`",8    "public_test_cases": [9        {10            "label": "Example 1",11            "input": "numBottles = 13, numExchange = 6",12            "output": "15 "13        },14        {15            "label": "Example 2",16            "input": "numBottles = 10, numExchange = 3",17            "output": "13 "18        }19    ],20    "private_test_cases": [21        {22            "input": [23                6,24                6825            ],26            "output": 627        },28        {29            "input": [30                57,31                9532            ],33            "output": 5734        },35        {36            "input": [37                52,38                6439            ],40            "output": 5241        },42        {43            "input": [44                49,45                4746            ],47            "output": 5048        },49        {50            "input": [51                28,52                4753            ],54            "output": 2855        },56        {57            "input": [58                30,59                360            ],61            "output": 3662        },63        {64            "input": [65                24,66                867            ],68            "output": 2669        },70        {71            "input": [72                74,73                4874            ],75            "output": 7576        },77        {78            "input": [79                9,80                9681            ],82            "output": 983        },84        {85            "input": [86                93,87                4188            ],89            "output": 9590        }91    ],92    "haskell_template": "maxBottlesDrunk :: Int -> Int -> Int\nmaxBottlesDrunk numBottles numExchange ",93    "ocaml_template": "let maxBottlesDrunk (numBottles: int) (numExchange: int) : int =  ",94    "scala_template": "def maxBottlesDrunk(numBottles: Int,numExchange: Int): Int = { \n    \n}",95    "java_template": "class Solution {\n    public int maxBottlesDrunk(int numBottles, int numExchange) {\n        \n    }\n}",96    "python_template": "class Solution(object):\n    def maxBottlesDrunk(self, numBottles, numExchange):\n        \"\"\"\n        :type numBottles: int\n        :type numExchange: int\n        :rtype: int\n        \"\"\"\n        "97}