✅ C++ | Easy | Self Explanatory | faster than 100.00%
Do UPVOTE if it helps :)\n\n\nint minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {\n        int sum=0,
**Do UPVOTE if it helps :)**\n\n```\nint minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {\n        int sum=0,a=0,cnt=0;\n        for(int i : energy) sum+=i;\n        if(sum>= initialEnergy) a = sum-initialEnergy+1;\n        for(int i=0;i<size(experience);i++)\n        {\n            if(experience[i]>=initialExperience) {\n                int temp = experience[i]-initialExperience+1;\n                cnt+=temp;\n                initialExperience+=temp+experience[i];\n            }\n            else initialExperience+=experience[i];\n        }\n        return a+cnt;\n    }\n```
['C', 'C++']