AtCoder Regular Contest 178
翻译中…
Problem Statement
翻译中…
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_{1}$is a positive integer with$A_{1}$digits in decimal notation.$X_{2}$is a positive integer with$A_{2}$digits in decimal notation.$X_{3}$is a positive integer with$A_{3}$digits in decimal notation.$X_{1} + X_{2} = X_{3}$.
翻译中…
You are given $T$ test cases per input file; solve each of them.
翻译中…
Constraints
翻译中…
$1 \leq T \leq 10^{5}$$1 \leq A_{i} \leq 10^{9}$- All input values are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
T
\text{case}_{1}
\text{case}_{2}
\vdots
\text{case}_{T}
翻译中…
Each case is given in the following format:
翻译中…
A_{1} A_{2} A_{3}
翻译中…
Output
翻译中…
Print $T$ lines. The $i$-th line should contain the answer for $\text{case}_{i}$.
翻译中…
样例
Input #1
4
1 1 1
1 6 7
167 167 167
111 666 777
Output #1
36
45
731780675
0
For the first case, tuples such as $(X_{1}, X_{2}, X_{3}) = (1, 6, 7), (2, 1, 3)$ satisfy the conditions.
On the other hand, tuples such as $(X_{1}, X_{2}, X_{3}) = (6, 7, 13), (3, 4, 5)$ do not.
There are $36$ tuples $(X_{1}, X_{2}, X_{3})$ that satisfy the conditions, so print $36$.
For the third case, remember to print the result modulo $998244353$.
For the fourth case, there may be no tuples $(X_{1}, X_{2}, X_{3})$ that satisfy the conditions.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。