[Python3] 1-line
Please check out this commit for solutions of weekly 267.\n\n\nclass Solution:\n    def timeRequiredToBuy(self, tickets: List[int], k: int) -> int:\n        ret
Please check out this [commit](https://github.com/gaosanyong/leetcode/commit/8d693371fa97ea3b0717d02448c77201b15e5d12) for solutions of weekly 267.\n\n```\nclass Solution:\n    def timeRequiredToBuy(self, tickets: List[int], k: int) -> int:\n        return sum(min(tickets[k]-int(i>k), x) for i, x in enumerate(tickets))\n```\n\n```\nclass Solution:\n    def timeRequiredToBuy(self, tickets: List[int], k: int) -> int:\n        ans = behind = 0 \n        for i, x in enumerate(tickets): \n            if i > k: behind = 1\n            if x < tickets[k] - behind: ans += x\n            else: ans += tickets[k] - behind\n        return ans \n```
['Python3']