{"problem":{"name":"1 + 6 = 7","description":{"content":"You are given positive integers $A_{1}, A_{2}, A_{3}$. Find the number, modulo $998244353$, of tuples of positive integers $(X_{1}, X_{2}, X_{3})$ that satisfy all of the following conditions. *   $X","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc178_b"},"statements":[{"statement_type":"Markdown","content":"You are given positive integers $A_{1}, A_{2}, A_{3}$. Find the number, modulo $998244353$, of tuples of positive integers $(X_{1}, X_{2}, X_{3})$ that satisfy all of the following conditions.\n\n*   $X_{1}$ is a positive integer with $A_{1}$ digits in decimal notation.\n*   $X_{2}$ is a positive integer with $A_{2}$ digits in decimal notation.\n*   $X_{3}$ is a positive integer with $A_{3}$ digits in decimal notation.\n*   $X_{1} + X_{2} = X_{3}$.\n\nYou are given $T$ test cases per input file; solve each of them.\n\n## Constraints\n\n*   $1 \\leq T \\leq 10^{5}$\n*   $1 \\leq A_{i} \\leq 10^{9}$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$T$\n$\\text{case}_{1}$\n$\\text{case}_{2}$\n$\\vdots$\n$\\text{case}_{T}$\n\nEach case is given in the following format:\n\n$A_{1}$ $A_{2}$ $A_{3}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc178_b","tags":[],"sample_group":[["4\n1 1 1\n1 6 7\n167 167 167\n111 666 777","36\n45\n731780675\n0\n\nFor the first case, tuples such as $(X_{1}, X_{2}, X_{3}) = (1, 6, 7), (2, 1, 3)$ satisfy the conditions.\nOn the other hand, tuples such as $(X_{1}, X_{2}, X_{3}) = (6, 7, 13), (3, 4, 5)$ do not.\nThere are $36$ tuples $(X_{1}, X_{2}, X_{3})$ that satisfy the conditions, so print $36$.\nFor the third case, remember to print the result modulo $998244353$.\nFor the fourth case, there may be no tuples $(X_{1}, X_{2}, X_{3})$ that satisfy the conditions."]],"created_at":"2026-03-03 11:01:13"}}