Sum of Floored Pairs
\n\n# Code\npython []\nfrom collections import Counter\n\nclass Solution(object):\n    def sumOfFlooredPairs(self, nums):\n        # Create a list to store the 
\n\n# Code\n```python []\nfrom collections import Counter\n\nclass Solution(object):\n    def sumOfFlooredPairs(self, nums):\n        # Create a list to store the increases and a counter for the frequencies of nums\n        incs, counter = [0] * (max(nums) + 1), Counter(nums)  \n        \n        # Loop over all the divisors\n        for num in counter:  \n            # Loop over all the possible dividends where the quotient increases\n            for j in range(num, len(incs), num):  \n                incs[j] += counter[num]  # Increment the increases in quotients\n        \n        # Manually calculate the accumulated sums\n        quots = [0] * len(incs)  # Initialize the list for accumulated sums\n        current_sum = 0  # Variable to hold the running total\n        for i in range(len(incs)):\n            current_sum += incs[i]  # Accumulate the sums\n            quots[i] = current_sum  # Store the accumulated value\n        \n        total_sum = 0  # Initialize a variable to store the total sum\n        for num in nums:\n            total_sum += quots[num]  # Sum up all the quotients for all the numbers in the list.\n        \n        return total_sum % 1000000007  # Return the result modulo 10^9 + 7\n\n```
['Python']