Python 3   ||   7 lines,  binary search   ||   T/S: 94% / 81%
\nclass Solution:\n    def successfulPairs(self, spells: List[int], potions: List[int], success: int) -> List[int]:\n\n        n, ans = len(potions), []\n      
```\nclass Solution:\n    def successfulPairs(self, spells: List[int], potions: List[int], success: int) -> List[int]:\n\n        n, ans = len(potions), []\n        potions.sort()\n        \n        for s in spells:\n            num = success//s + bool(success%s)\n            idx = bisect_left(potions, num)\n            ans.append(n-idx)\n\n        return ans\n```\n[https://leetcode.com/problems/successful-pairs-of-spells-and-potions/submissions/1286592686/](https://leetcode.com/problems/successful-pairs-of-spells-and-potions/submissions/1286592686/)\n\nI could be wrong, but I think that time complexity is *O*(*N* log *N*) and space complexity is *O*(*N*), in which *N* ~ `len(potions)`.
['Python3']