Java - Simple Brute approach, Using memorization, 100% faster!!!
\nimport java.util.Arrays;\n\nclass Solution {\n    public int sumOfFlooredPairs(int[] arr) {\n        \n    \tint i,j,k,max,n=arr.length;\n    \tlong sum=0,tot
```\nimport java.util.Arrays;\n\nclass Solution {\n    public int sumOfFlooredPairs(int[] arr) {\n        \n    \tint i,j,k,max,n=arr.length;\n    \tlong sum=0,tot=0;\n    \tArrays.sort(arr);\n    \tmax=arr[n-1];\n    \tint count[]=new int[max+1];\n    \tfor(i=0;i<n;i++)\n    \t\tcount[arr[i]]++;\n    \tfor(i=1;i<=max;i++)\n    \t\tcount[i]+=count[i-1];\n    \tfor(k=0;k<n;k++)\n    \t{\n            if(k>0&&arr[k]-arr[k-1]==0)\n                continue;\n            i=arr[k];\n    \t\tfor(j=2;j<=max/i+1;j++)\n    \t\t{\n    \t\t\tint lower=i*(j-1)-1;\n    \t\t\tint upper=i*(j)-1;\n    \t\t\tsum+=(count[Math.min(max, upper)]-count[lower])*(j-1);\n    \t\t}\n    \t\ttot+=sum*(count[i]-count[i-1]);\n            sum=0;\n    \t}\n        return (int)(tot%1000000007);\n    }\n}\n```
['Java']