Two counters
Code\n\nclass Solution:\n    def sumOfFlooredPairs(self, nums: List[int]) -> int:\n        c = Counter(nums)\n        mx=  max(nums)\n        muls = defaultdict
# Code\n```\nclass Solution:\n    def sumOfFlooredPairs(self, nums: List[int]) -> int:\n        c = Counter(nums)\n        mx=  max(nums)\n        muls = defaultdict(int)\n        for key in c:\n            t = 1\n            while t*key <= mx:\n                muls[t*key]+=c[key]\n                t+=1\n        t = sorted(muls.keys(), reverse = True)\n        cnt = 0\n        res = 0\n        for key in sorted(c.keys()):\n            while t and t[-1] <= key:\n                cnt += muls[t.pop()] \n            res += cnt* c[key]\n        return res%(10**9+7)\n```
['Python3']