{"raw_statement":[{"iden":"problem statement","content":"You are given $N$\\-digit positive integers $A$ and $B$ whose topmost digits are not $0$.\nYou can repeat the following operation any number of times (possibly zero).\n\n*   Choose an integer $i$ such that $1 \\le i \\le N$ and swap the $i$\\-th lowest digits of $A$ and $B$.\n\nFind the smallest possible value of $A \\times B$ after your operations, modulo $998244353$.\nNote that you are not asked to minimize the remainder when $A \\times B$ is divided by $998244353$."},{"iden":"constraints","content":"*   $1 \\le N \\le 200000$\n*   $A$ and $B$ are $N$\\-digit positive integers whose topmost digits are not $0$."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$A$\n$B$"},{"iden":"sample input 1","content":"2\n13\n22"},{"iden":"sample output 1","content":"276\n\nYou can make $A \\times B = 276$ by performing the operation once, as follows.\n\n*   Choose $i=1$ to swap the bottommost digits of $A$ and $B$, making $A=12, B=23$.\n\nYou cannot make $A \\times B = 275$ or less, so the answer is $276$."},{"iden":"sample input 2","content":"8\n20220122\n21002300"},{"iden":"sample output 2","content":"54558365\n\nFind the value modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}