#JSUTFPC2025L. Solving Equations II —— 解方程 II
Solving Equations II —— 解方程 II
Statement
Let the coefficients of a linear equation with variables all be 1, and its sum be . Find the number of non-negative integer solutions to this equation modulo 998244353.
In other words, we are seeking the number of non-negative integer solutions to the equation
Since the answer may be very large, please provide the value of the result modulo 998244353.
Input
A line containing two integers and separated by a space, where .
Output
Output an integer representing the value of the number of non-negative integer solutions to the equation modulo 998244353.
Samples
2 3
4
3 4
15
Notes
The possible outcomes for the first set of samples, , are:
- ,
- ,
- ,
- .
There are 4 sets of solutions.