No.1964 sum = length
Problem Statement
In competitive programming, an array of length $n$ is usually given as input on a single line, separated by spaces, like this:
$a_1\ a_2\dots a_n$
as shown above.
In this problem, the array $a$ is assumed to be input in the format above.
Here, for an array $a$, we define $f(a)=aを入力で与えた時の入力の長さ$, that is, the length of the input when the array is given as input (excluding the trailing newline).
How many arrays $a$ of length $n$ whose elements are all positive integers satisfy $f(a)=\sum_{i=1}^{n}a_i$?
Since the answer can be very large, output it modulo $998244353$.
Here, arrays $x,y$ of length $K$ are considered different if there exists at least one integer $i$ such that $x_i\ne y_i (1≤i≤K)$.
(Added on 2022/6/4)
The input length of the array $a$ means the length of $a$ viewed as a string, that is, the total of the number of digits of each element of $a$ and the number of separating spaces.
Also, each element of $a$ is given in base $10$.
Input
$n$
- The 1st line contains an integer $n$.
- $1≤n≤200$
- $n$ is an integer.
Output
Output the answer on 1 line. Do not forget to output it $\mod\ 998244353$. Print a newline at the end.
Sample
Sample 1
Input
2
Output
2
There are 2 such arrays: $a=(1,2),(2,1)$.
Sample 2
Input
1
Output
1
The only such array is $a=(1)$.
Sample 3
Input
17
Output
609415864
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
harurun