C++ | Pure math, no algorithm
\nclass Solution {\npublic:\n    string abbreviateProduct(int left, int right) {\n        int num_2 = 0, num_5 = 0;\n        vector<int> arr;\n        for(int i
```\nclass Solution {\npublic:\n    string abbreviateProduct(int left, int right) {\n        int num_2 = 0, num_5 = 0;\n        vector<int> arr;\n        for(int i=left; i<=right; i++) {\n            int num = i;\n            while(!(num % 2)) {\n                num_2 += 1;\n                num /= 2;\n            }\n            while(!(num % 5)) {\n                num_5 += 1;\n                num /= 5;\n            }\n            arr.push_back(num);\n        }\n        int C = min(num_2, num_5);\n        long M = 1e5;\n        long suf = 1;\n        for(auto& num : arr) {\n            suf *= long(num);\n            suf %= M;\n        }\n        for(int i=C+1; i<=num_2; i++) {\n            suf *= 2;\n            suf %= M;\n        }\n        for(int i=C+1; i<=num_5; i++) {\n            suf *= 5;\n            suf %= M;\n        }\n        double log = 0.0;\n        for(int i=left; i<=right; i++) log += log10(double(i));\n        log -= double(C);\n        if(log < 10.0) {\n            suf = 1;\n            for(auto& num : arr) suf *= long(num);\n            for(int i=C+1; i<=num_2; i++) suf *= 2;\n            for(int i=C+1; i<=num_5; i++) suf *= 5;\n            return to_string(suf) + "e" + to_string(C);\n        }\n        log -= floor(log);\n        log += 4.0;\n        int prev = int(pow(10.0, log));\n        char p[30];\n        snprintf(p, 30, "%5d...%05de%d", prev, suf, C);\n        return string(p);\n    }\n};\n```
['C']