{"problem":{"name":"Swap Digit","description":{"content":"You are given $N$\\-digit positive integers $A$ and $B$ whose topmost digits are not $0$. You can repeat the following operation any number of times (possibly zero). *   Choose an integer $i$ such tha","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc154_a"},"statements":[{"statement_type":"Markdown","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$.\n\n## Constraints\n\n*   $1 \\le N \\le 200000$\n*   $A$ and $B$ are $N$\\-digit positive integers whose topmost digits are not $0$.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n$A$\n$B$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc154_a","tags":[],"sample_group":[["2\n13\n22","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$."],["8\n20220122\n21002300","54558365\n\nFind the value modulo $998244353$."]],"created_at":"2026-03-03 11:01:13"}}