Easy

Find the Maximum Achievable NumberC++

Full explanation · Time O(1) · Space O(1)

// Time:  O(1)
// Space: O(1)

// greedy
class Solution {
public:
    int theMaximumAchievableX(int num, int t) {
        return num + 2 * t;
    }
};