Python most optimized solution
Intuition\n Describe your first thoughts on how to solve this problem. \n[[2//2, 2//5, 2//9],\n [5//2, 5//5, 5//9],\n [9//2, 9//5, 9//9]]\n\n let\'s take 9//2 w
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n[[2//2, 2//5, 2//9],\n [5//2, 5//5, 5//9],\n [9//2, 9//5, 9//9]]\n\n let\'s take 9//2 what it represents, it represents that there are total\n of 4 number (2,4,6,8) before 9 that are multiple of 2. so its value \n would be 4. same goes for others like 9//5 its just 1 (5).[next would be\n 10 but its greater than 9 so we cant take that into consideration.]\n\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nwith that knowledege we just have to know for each number how lets say 5 \n how many numbers have its multiple of less than equal to 5 for all number\n smaller than equal to 5[which is in original array nums].\n\n for 5 its just 5\n for 2 its 2, 4 \n\n so there are in total 3 number which gives sum of quotient for all fraction \n that has numerator 5. similarly we can find for all element in array. and \n return its sum.\n\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def sumOfFlooredPairs(self, nums: List[int]) -> int:\n        \n        ls, counter=[0]*(max(nums)+1), Counter(nums)\n        for num in counter:\n            for j in range(num, len(ls), num):\n                ls[j] += counter[num]\n        prefix = [ls[0]]\n        for i, n in enumerate(ls):\n            if i > 0:\n                prefix.append(prefix[-1] + n)\n        return sum([prefix[num] for num in nums]) % (10**9 + 7)\n```
['Hash Table', 'Math', 'Prefix Sum', 'Python3']