2383.Minimum Hours of Training to win a Competition
\nclass Solution:\n    def minNumberOfHours(self, initialEnergy: int, initialExperience: int, energy: List[int], experience: List[int]) -> int:\n        t=0\n  
```\nclass Solution:\n    def minNumberOfHours(self, initialEnergy: int, initialExperience: int, energy: List[int], experience: List[int]) -> int:\n        t=0\n        e=0\n        exp=0\n        if sum(energy)>=initialEnergy:\n            e=sum(energy)-initialEnergy+1\n        else:\n            e=0\n        #e=e-initialEnergy\n        #print(e)\n        for i in range(len(experience)):\n            if experience[i]>=initialExperience:\n                exp+=experience[i]-initialExperience+1\n                initialExperience=experience[i]+1\n            initialExperience+=experience[i]\n        #print(exp)\n        t=e+exp\n        return t\n```
[]