Company: Mthree _6march
Difficulty: medium
Complete 45 Challenges Problem Description You are playing a video game. This game has N challenges, each with some initial energy cost. You also have an initial energy X . You need to complete the challenges individually. When you start a challenge, your health points are: You win, and the challenge gets completed only if your health is greater than equal to 4. Your energy is reduced by one because of exhaustion from the fight. Note: You can complete the challenges in any order. Find the maximum number of challenges you can complete. Function Description Complete the solve function. The function takes 3 parameters and returns an integer representing the answer to the question. N : Represents the number of challenges X : Represents your initial energy A : Represents the energy associated with N challenges Input Format for Custom Testing Note: Use this input format if you are testing against custom input or writing code in a language where we don't provide boilerplate. The first line co