Non-bruteforce algorithm in Python3 with numpy
As suggested in the hints, the three parts are calculated separately.  The precision issue in the Python built-in floating numbers happen, so I use numpy.float1
As suggested in the hints, the three parts are calculated separately.  The precision issue in the Python built-in floating numbers happen, so I use numpy.float128 instead of the built-in floats. \n\n```\nimport numpy\n\nclass Solution:\n    def abbreviateProduct(self, left: int, right: int) -> str:\n        log_prod = numpy.float128(0)\n        last = 1\n        num_zeros = 0\n        for x in range(left, right+1):\n            log_prod += numpy.log10(x)\n            last *= x\n            while last % 10 == 0:\n                last //= 10\n                num_zeros += 1\n            last %= 1000000000000\n        x = floor(log_prod)\n        if x - num_zeros < 10:\n            return "%de%d" % (last % 10000000000, num_zeros)\n        return "%.0f...%05de%d" % (floor(numpy.power(10, (4 + log_prod - x))), last % 100000, num_zeros)\n        \n
['Python', 'Python3']