Best java 35ms
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\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    public int sumOfFlooredPairs(int[] nums) {\n   int MOD = 1000000007;\n        int maxNum = Arrays.stream(nums).max().getAsInt();\n        int[] count = new int[maxNum + 1];\n        for (int num : nums) {\n            count[num]++;\n        }\n        for (int i = 1; i <= maxNum; i++) {\n            count[i] += count[i - 1];\n        }\n        long result = 0;\n        for (int i = 1; i <= maxNum; i++) {\n            if (count[i] == count[i - 1]) {\n                continue;\n            }\n            long sum = 0;\n            for (int j = 1; j * i <= maxNum; j++) {\n                int l = j * i - 1;\n                int r = Math.min(j * i + i - 1, maxNum);\n                sum += (long) j * (count[r] - count[l]);\n            }\n            result += sum * (count[i] - count[i - 1]);\n        }\n        return (int) (result % MOD); \n    }\n}\n```
['Java']