問題一覧 > 通常問題

No.2582 Random Average^K

レベル : / AI推定難易度 : 2200 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 41
作問者 : とりゐ / テスター : 👑 qand
お気に入りにしたユーザー ProblemId : 9709 / 自分の提出
問題文最終更新日: 2023-12-05 16:59:05
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
Advent Calendar Contest 2023 (順位表) の他の問題:

Problem Statement

There are $N$ continuous random variables, each following the continuous uniform distribution on the range $[0,1]$.
Find the expected value of the $K$-th power of the arithmetic mean of these $N$ random variables, $\mathrm{mod}\ 998244353$.

Definition of the expected value $\mathrm{mod}\ 998244353$ It can be proved that the expected value to be found is always a rational number. It can also be proved that, under the constraints of this problem, when this value is expressed as an irreducible fraction $\frac{P}{Q}$, we have $Q\not\equiv 0(\mathrm{mod}\ 998244353)$. Therefore, an integer $R$ satisfying $R\times Q\equiv P(\mathrm{mod}\ 998244353),0\leq R\lt 998244353$ is uniquely determined. Output this $R$.

Input

$N\ K$

  • $1\leq N\leq 10^6$
  • $1\leq K\leq 10^7$
  • $N,K$ are integers

Output

Print a newline at the end.

Sample

Sample 1
Input
1 1
Output
499122177

The expected value to be found is $\dfrac{1}{2}$.

Sample 2
Input
2 2
Output
41593515

The expected value to be found is $\dfrac{7}{24}$.

Sample 3
Input
123 456
Output
526250083

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