| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 4 초 | 1024 MB | 28 | 21 | 9 | 60.000% |
You have $R$ red balls, $B$ blue balls, and one green ball. You are going to arrange the balls in a row. The score of an arrangement is defined as follows:
Find the sum of scores of all possible arrangements, modulo 998244353ドル$. Note that balls of the same color cannot be distinguished, thus two arrangements are considered different if and only if there is such an $i$ that the color of the $i$-th ball in the first arrangement differs from that of the second.
The first line contains integers $R$ (1ドル \leq R \leq 10^{18}$) and $B$ (1ドル \leq B \leq 10^6$).
Print the answer.
10 3
8390
3 10
0
100 10
801171977
999999999999999999 999999
448294209