FPEvalDataset/LeetCodeProblem
0305
1{2 "id": 2812,3 "name": "find_the_maximum_achievable_number",4 "difficulty": "Easy",5 "link": "https://leetcode.com/problems/find-the-maximum-achievable-number/",6 "date": "2023-07-02 00:00:00",7 "task_description": "Given two integers, `num` and `t`. A **number **`x`** **is** achievable** if it can become equal to `num` after applying the following operation **at most** `t` times: Increase or decrease `x` by `1`, and _simultaneously_ increase or decrease `num` by `1`. Return the **maximum **possible value of `x`. **Example 1:** **Input:** num = 4, t = 1 **Output:** 6 **Explanation:** Apply the following operation once to make the maximum achievable number equal to `num`: Decrease the maximum achievable number by 1, and increase `num` by 1. **Example 2:** **Input:** num = 3, t = 2 **Output:** 7 **Explanation:** Apply the following operation twice to make the maximum achievable number equal to `num`: Decrease the maximum achievable number by 1, and increase `num` by 1. **Constraints:** `1 <= num, t <= 50`",8 "public_test_cases": [9 {10 "label": "Example 1",11 "input": "num = 4, t = 1",12 "output": "6 "13 },14 {15 "label": "Example 2",16 "input": "num = 3, t = 2",17 "output": "7 "18 }19 ],20 "private_test_cases": [21 {22 "input": [23 47,24 625 ],26 "output": 5927 },28 {29 "input": [30 3,31 4532 ],33 "output": 9334 },35 {36 "input": [37 30,38 1639 ],40 "output": 6241 },42 {43 "input": [44 39,45 4646 ],47 "output": 13148 },49 {50 "input": [51 36,52 2853 ],54 "output": 9255 },56 {57 "input": [58 47,59 460 ],61 "output": 5562 },63 {64 "input": [65 8,66 2367 ],68 "output": 5469 },70 {71 "input": [72 3,73 4374 ],75 "output": 8976 },77 {78 "input": [79 27,80 3381 ],82 "output": 9383 },84 {85 "input": [86 39,87 3288 ],89 "output": 10390 }91 ],92 "haskell_template": "theMaximumAchievableX :: Int -> Int -> Int\ntheMaximumAchievableX num t ",93 "ocaml_template": "let theMaximumAchievableX (num: int) (t: int) : int = ",94 "scala_template": "def theMaximumAchievableX(num: Int,t: Int): Int = { \n \n}",95 "java_template": "class Solution {\n public int theMaximumAchievableX(int num, int t) {\n \n }\n}",96 "python_template": "class Solution(object):\n def theMaximumAchievableX(self, num, t):\n \"\"\"\n :type num: int\n :type t: int\n :rtype: int\n \"\"\"\n "97}