Straightforward solution
Code\npy\nclass Solution:\n    def splitMessage(self, message: str, limit: int) -> List[str]:\n        def mysum(parts):\n            if parts < 10: return part
# Code\n```py\nclass Solution:\n    def splitMessage(self, message: str, limit: int) -> List[str]:\n        def mysum(parts):\n            if parts < 10: return parts\n            if parts < 100: return 2*(parts-9) + mysum(9)\n            if parts < 1000: return 3*(parts-99) + mysum(99)\n            if parts < 10000: return 4*(parts-999)+mysum(999)\n            return 5 + mysum(9999)\n        for parts in range(1, len(message)+1):\n            #O(n) - bad\n            # totalLen = len(message) + sum(len(\'<{}/{}>\'.format(i,parts)) for i in range(1,parts+1))\n            #O(1) - good\n            totalLen = len(message) + 3*parts + mysum(parts) + parts * len(str(parts))\n            if ceil(totalLen / limit) == parts:\n                #Run simulation\n                ret = []\n                ind = 0\n                for i in range(1, parts+1):\n                    counter = \'<{}/{}>\'.format(i,parts)\n                    j = ind + limit - len(counter)\n                    ret.append(message[ind:j]+counter)\n                    ind = j\n                return ret\n        return []\n```
['Python3']