✅C#
```\npublic class Solution\n    {\n        public int MinNumberOfHours(int initialEnergy, int initialExperience, int[] energy, int[] experience)\n        {\n   
```\npublic class Solution\n    {\n        public int MinNumberOfHours(int initialEnergy, int initialExperience, int[] energy, int[] experience)\n        {\n            var result = 0;\n            for (int index = 0; index < energy.Length; index++)\n            {\n                if (initialEnergy <= energy[index])\n                {\n                    var minVal = energy[index] + 1 - initialEnergy;\n                    result += minVal;\n                    initialEnergy += minVal;\n                }\n                initialEnergy -= energy[index];\n                if (initialExperience <= experience[index])\n                {\n                    var minVal = experience[index] + 1 - initialExperience;\n                    result += minVal;\n                    initialExperience += minVal;\n                }\n                initialExperience += experience[index];\n            }\n            return result;\n        }\n    }
[]