{"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\"\u003eIn OddLand, there are many odd shops.\u003cbr\u003eThese shops only sell goods weighted from 1 to 10. For every weight i in [1,10], there are $a_i$ kinds of goods weighted i.\u003cbr\u003eThe shops are odd because one is only allowed to buy one item or nothing in each shop. And though goods in every shop are different, the array $a$ for each shop is the same.\u003cbr\u003eAs you love odd things so much, you wonder for how many total weights, there are odd ways to buy items in n odd shops to achieve this total weight. Since there might be many, output the number mod 998244353.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are multiple test cases, please read till the end of input file.\u003cbr\u003eFor each test case, the first line contain a single integer n, the number of odd shops.\u003cbr\u003eThe second line contain ten integers separated by spaces, $a_1,a_2...a_{10}$.\u003cbr\u003e$1 \\leq n \\leq 10^9, 0 \\leq a_i \\leq 100$. No more than 10 test cases."}},{"title":"Output","value":{"format":"HTML","content":"For every test case, output the number of valid total weights mod 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\n1 2 3 4 5 6 7 8 9 10\r\n2\r\n1 0 0 0 0 0 0 0 0 0\r\n100\r\n1 1 1 1 0 0 0 0 0 0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\r\n2\r\n35\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}