CPP Simple Solution
\nint minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {\n        int energyHour = 0;\n        int expHo
```\nint minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {\n        int energyHour = 0;\n        int expHour = 0;\n        for(int i = 0; i < energy.size(); i++)\n        {\n            int diffEnergy = abs(initialEnergy - energy[i]);\n            if(initialEnergy - energy[i] < 1)\n            {\n                initialEnergy += diffEnergy + 1 - energy[i];\n                energyHour += diffEnergy + 1;\n                diffEnergy = 0;\n            }\n            else\n            {\n                initialEnergy -= energy[i];\n            }\n            int diffExp = abs(initialExperience - experience[i]);\n            if(initialExperience - experience[i] < 1)\n            {\n                initialExperience += experience[i] + diffExp + 1;\n                expHour += diffExp + 1;\n                diffExp = 0;\n            }\n            else\n            {\n                initialExperience += experience[i];\n            }\n        }\n        return expHour + energyHour;\n    }\n```
[]