AtCoder Grand Contest 058
翻译中…
Problem Statement
翻译中…
You are given integers $A$, $B$, and $C$. How many strings $S$ consisting of A, B, and C satisfy all of the following conditions? Find the count modulo $998244353$.
翻译中…
- The number of occurrences of
A,B, andCin$S$are$A$,$B$, and$C$, respectively. $S$contains none ofABC,BCA, andCABas a (contiguous) substring.
翻译中…
Constraints
翻译中…
$1 \leq A,B,C \leq 10^6$- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
A B C
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
1 1 1
Output #1
3
The three strings that satisfy the conditions are `ACB`, `CBA`, and `BAC`.
Input #2
2 2 2
Output #2
42
Input #3
96 11 46
Output #3
818015722
Input #4
125132 102271 152064
Output #4
128086069
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。