問題一覧 > 通常問題

No.2413 Multiple of 99

レベル : / AI推定難易度 : 2000 / 実行時間制限 : 1ケース 8.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 39
作問者 : 👑 AngrySadEight / テスター : Ricky_pon 👑 hamamu
お気に入りにしたユーザー ProblemId : 9924 / 自分の提出
問題文最終更新日: 2023-08-02 10:16:51
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 401 (順位表) の他の問題:

Problem Statement

For a non-negative integer $x$, let $d(x)$ denote the sum of its digits in base $10$.

Among the integers at least $0$ and less than $10^N$, those that are multiples of $99$ are called elegant numbers.

Let $X$ be the set of all elegant numbers. Find the sum, over all $x$ contained in $X$, of the value of $d(x)$ raised to the power $K$, modulo $998244353$.

That is, find $\sum_{x \in X} \{d(x)\}^K$ modulo $998244353$.

Constraints

  • All inputs are integers.
  • $2 \leq N \leq 10^5$
  • $1 \leq K \leq 10^5$

Input

The input is given from standard input in the following format.

$N$ $K$

Output

Output the answer.

Sample

Sample 1
Input
2 2
Output
324

The only elegant numbers are $0$ and $99$.

Since $d(0) = 0, d(99) = 18$, the desired value is $0^2 + 18^2 = 324$.

Sample 2
Input
3 1
Output
180

There are $11$ elegant numbers: $0, 99, 198, 297, 396, 495, 594, 693, 792, 891, 990$. Among these, only $0$ has a digit sum of $0$, and the other $10$ have a digit sum of $18$.

Therefore, the desired value is $0^1 \times 1 + 18^1 \times 10 = 180$.

Sample 3
Input
14 2013
Output
212631289

Find the remainder when divided by $998244353$.

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