{"raw_statement":[{"iden":"problem statement","content":"For a positive integer $n$, define $R_n$ as \"the integer obtained by interpreting a string of $n$ consecutive $1$s as a decimal number\". For example, $R_3 = 111$.\nYou are given a positive integer sequence $A = (A_1, A_2, \\dots, A_N)$.  \nFor $k = 1, 2, \\dots, N$, calculate $\\mathrm{LCM}(R_{A_1}, R_{A_2}, \\dots, R_{A_k}) \\bmod 998244353$. Here, $\\mathrm{LCM}$ is the function that calculates the least common multiple."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq A_i \\leq 2 \\times 10^5$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\dots$ $A_N$"},{"iden":"sample input 1","content":"3\n2 4 6"},{"iden":"sample output 1","content":"11\n1111\n11222211\n\nFor $k=1$, $\\mathrm{LCM}(11) \\bmod 998244353 = 11$.  \nFor $k=2$, $\\mathrm{LCM}(11,1111) \\bmod 998244353= 1111$.  \nFor $k=3$, $\\mathrm{LCM}(11,1111,111111) \\bmod 998244353= 11222211$."},{"iden":"sample input 2","content":"1\n200000"},{"iden":"sample output 2","content":"202819780"},{"iden":"sample input 3","content":"10\n47718 21994 98917 104184 160670 190107 125377 29127 7017 177076"},{"iden":"sample output 3","content":"429620650\n844699313\n355160870\n608402385\n858856681\n605347397\n566966598\n429324494\n370941155\n567238109"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}