Binary Search Python
\nclass Solution:\n    def sumOfFlooredPairs(self, nums: List[int]) -> int:\n        nums.sort()\n        r,x=0,len(nums)\n        for i in range(len(nums)):\n 
```\nclass Solution:\n    def sumOfFlooredPairs(self, nums: List[int]) -> int:\n        nums.sort()\n        r,x=0,len(nums)\n        for i in range(len(nums)):\n            if i>0 and nums[i]==nums[i-1]:\n                r+=tmp\n                continue\n            tmp,n,l=0,nums[-1]//nums[i],x\n            while n>0:\n                b=bisect.bisect_left(nums,nums[i]*n)\n                tmp+=(l-b)*(n) \n                l,n=b,n-1\n            r+=tmp\n        return r%(10**9+7)\n```
[]