C++ . Beats 100%.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n- O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {\n        int exp=0;\n        int egy=0;\n\n        for(int i=0;i<energy.size();i++){\n\n            egy += energy[i];\n\n            if(initialExperience > experience[i])\n                initialExperience += experience[i];\n            \n            else if(initialExperience < experience[i]){\n                exp += experience[i]-initialExperience+1;\n                initialExperience += experience[i]+exp;\n            }\n\n            else{\n                exp += 1;\n                initialExperience += experience[i]+1;\n            }\n        }\n        egy=egy-initialEnergy+1;\n        if(egy<0)\n            egy=0;\n        int ans=exp+egy;\n        return ans;\n    }\n};\n```
['C++']