問題一覧 > 通常問題

No.1964 sum = length

レベル : / AI推定難易度 : 1250 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 98
作問者 : harurun / テスター : MtSaka
お気に入りにしたユーザー ProblemId : 8038 / 自分の提出
問題文最終更新日: 2022-06-04 19:59:03
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 346 (順位表) の他の問題:

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

Did you take the mod?

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。