python3 Solution
\n\nclass Solution:\n    def successfulPairs(self, spells: List[int], potions: List[int], success: int) -> List[int]:\n        potions.sort()\n        N=len(pot
\n```\nclass Solution:\n    def successfulPairs(self, spells: List[int], potions: List[int], success: int) -> List[int]:\n        potions.sort()\n        N=len(potions)\n        ans=[]\n        for s in spells:\n            target=(success-1)//s\n            index=bisect.bisect_right(potions,target)\n            ans.append(N-index)\n            \n        return ans    \n```
['Python', 'Python3']