{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eCathy loves numbers, and recently she fell in love with the separation of numbers. \u003cbr\u003e\u003cbr\u003eA separation of a number is defined as dividing the number into contiguous parts. For example, we can call ($11$)($451$)($4$) a separation of the number $114514$. The value of one separation is the sum of all the separated parts(the value of ($11$)($451$)($4$) equals to $11$+$451$+$4$\u003d$466$). If one part has leading zeros, it is also valid, so the separation ($1$)($00$) of number $100$ is a valid separation too. Now Cathy has a number $x$ without leading zeros, and she wants to know the total value of separations which divide the number into no more than $k$ parts. She is not quite smart so she asked you for help. \u003cbr\u003e\u003cbr\u003eSince the answer may be very large, you only need to output the answer modulo $998244353$.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains a number $T$($1 \\leq T \\leq 5$), the number of testcases.\u003cbr\u003e\u003cbr\u003eFor each testcase, there are two lines.\u003cbr\u003eThe first line contains a number $k$, the maximum number of parts.\u003cbr\u003eThe second line contains a number $x$, the queried number.\u003cbr\u003e\u003cbr\u003eLet $n$ be the number of digits of $x$, and we will have $1 \\leq n \\leq 10^6$ and $1 \\leq k \\leq n$.\u003cbr\u003e\u003cbr\u003eIt is guaranteed that for all testcases, $\\sum{n} \\leq 10^6$."}},{"title":"Output","value":{"format":"HTML","content":"For each testcase, output one number in one line, the answer modulo $998244353$."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n3\r\n100\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e112\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"In the sample, there are 4 possible separations with no more than 3 parts, (100),(1)(00),(10)(0),(1)(0)(0), and their values are 100, 1+0\u003d1, 10+0\u003d10, 1+0+0\u003d1 respectively, so the answer will be 100+1+10+1\u003d112."}}]}