c++, 56ms
\nclass Solution {\npublic:\n    string abbreviateProduct(int left, int right) {\n        long long t1=1;  // 5 digits, <100000\n        long long t2=0;  // 5+6
```\nclass Solution {\npublic:\n    string abbreviateProduct(int left, int right) {\n        long long t1=1;  // 5 digits, <100000\n        long long t2=0;  // 5+6 digits, <100000000000\n        // t1,t2 ... t3\n        unsigned long long e=0;\n        int i;\n        // very small\n        for(i=right; i>=left; i--) {\n            //cout<<i<<endl;\n            t1*=i;\n            while(t1%10==0) {\n                t1/=10;\n                e++;\n            }\n            if(t1>=1000000000000ll) // >=12 digits \n                break;\n        }\n        string ret;\n        \n        if(i!=left-1) {// bigger\n            t2 = t1;\n            t1 %=10000000000ll;\n            while(t2>=1000000000000ll)\n                t2/=10;\n            for(i--; i>=left; i--) {\n                t1*=i;\n                while(t1%10==0) {\n                    e++;\n                    t1/=10;\n                }\n                t2*=i;\n                t1%=10000000000ll;\n                while(t2>=1000000000000ll)\n                    t2/=10;\n            }\n        }\n        \n        if(t2==0) {\n            if(t1<10000000000ll) {\n                ret = to_string(t1)+"e"+to_string(e);\n            } else {\n                t2 = t1;\n                while(t2>=100000000000ll)\n                    t2 /=10;\n            }\n        }\n        \n        if(t2>0) {\n            while(t2>=100000)\n                t2/=10;\n            t1 %=100000; \n            ret = to_string(t2)+"...";\n            if(t1<10)\n                ret += "0000";\n            else if(t1<100)\n                ret += "000";\n            else if(t1<1000)\n                ret += "00";\n            else if(t1<10000)\n                ret += "0";\n            \n            ret = ret+to_string(t1)+"e"+to_string(e);\n        }\n        \n        return ret;\n    }\n};\n```
['Math']