{"ScriptPreparationCode":"function labor(value) {\r\n let leading0Count = 0n;\r\n let digitCount = 0n;\r\n let i = 0;\r\n for (; i \u003C value.length; i\u002B\u002B) {\r\n if (value[i] !== \u00270\u0027) {\r\n break;\r\n }\r\n leading0Count\u002B\u002B;\r\n }\r\n for (; i \u003C value.length; i\u002B\u002B) {\r\n if (value[i] === \u00270\u0027) {\r\n break;\r\n }\r\n digitCount\u002B\u002B;\r\n }\r\n if (digitCount === 0n) {\r\n return 0n;\r\n }\r\n return leading0Count \u002B digitCount;\r\n}\r\n\r\nconst trailingZeroes = /0*$/;\r\nconst empty = \u0027\u0027;\r\nfunction optim(value) {\r\n return BigInt(value.replace(trailingZeroes, empty).length);\r\n}\r\n","TestCases":[{"Name":"without","Code":"labor(\u0027000000000000000000000123456789123456789000000000000000000\u0027);","IsDeferred":false},{"Name":"with","Code":"optim(\u0027000000000000000000000123456789123456789000000000000000000\u0027);","IsDeferred":false}]}