c++ solution
\nclass Solution {\npublic:\n    const int MAX=1e5+5;\n    const int mod= 1e9+7;\n    int sumOfFlooredPairs(vector<int>& nums) {\n        vector<long long>prefi
```\nclass Solution {\npublic:\n    const int MAX=1e5+5;\n    const int mod= 1e9+7;\n    int sumOfFlooredPairs(vector<int>& nums) {\n        vector<long long>prefix(MAX,0);\n        unordered_map<int,int>mp;\n        int n=nums.size();\n        for(auto &it:nums){\n            prefix[it]++;\n            mp[it]++;\n        }\n        for(int i=1;i<MAX;i++){\n            prefix[i]+=prefix[i-1];\n            prefix[i]%=mod;\n        }\n        long long ans=0;\n        \n        for(auto &[key,value]:mp){\n            int num=key;\n            long long result=0;\n            for(int start=num;start<MAX;start+=num){\n                int end=min(MAX-1,start+num-1);\n                long long rangeSum = (prefix[end]-prefix[start-1])%mod;\n                long long floorValue = start/num;\n                result+=floorValue*rangeSum;\n                result%=mod;\n            }\n            ans+=result*value;\n            ans%=mod;\n        }\n        return ans;\n    }\n};\n```
['C', 'C++']