No.1357 Nada junior high school entrance examination 3rd day
タグ : / 解いたユーザー数 7
作問者 :
PCTprobability
/ テスター :
KoD
maguro
Problem Statement
The Nada Junior High School entrance examination normally lasts 2 days, but apparently there was a hidden third day in 2021. Please solve its problem.
For positive integers $N,M$, the function $f(N,M)$ is defined as follows. Prepare a coin that lands heads with probability $Z$, and play the following game $N$ times in succession. Initially, $Y=1$ and $Z = 1$. In the $i \,\, (1 \leq i \leq N)$-th game, perform the following operations.
- Toss the coin $1$ time, and if it lands heads, gain $Y×(-1)^{i+1}$ points.
- Replace $Z$ with $ \frac{i^{M-1}}{(i+1)^M}×Z$.
- Replace $Y$ with $(N-i)×Y$.
Here, outputting a rational number in $ \bmod 998244353$ means the following: it is guaranteed that the number can be expressed as $c_i=\frac{P}{Q}$ (an irreducible fraction) using coprime integers, an integer $P$ and a positive integer $Q$ not divisible by $998244353$, so output the unique positive integer $R$ that is at least $0$ and less than $998244353$ such that $P \equiv Q×R \bmod 998244353$.
Input
$K$
- All inputs are positive integers.
- $1 \le K \le 5×10^4$
Output
Find \( \displaystyle \sum_{a=1}^{K} \displaystyle \sum_{b=1}^{∞} \frac{f(b,2a-1)}{b} \). Here, it can be proved that this value can be uniquely expressed as \( \displaystyle \sum_{i=0}^{2K}c_iπ^i \) using a sequence of rational numbers $c_0,c_1,...,c_{2K}$. Output this sequence of rational numbers $c_0,c_1,...,c_{2K}$ modulo $ \bmod 998244353$, separated by spaces.
Sample
Sample 1
Input
1
Output
0 0 166374059
\( \displaystyle \sum_{a=1}^{1} \displaystyle \sum_{b=1}^{∞} \frac{f(b,2a-1)}{b} \)$= \frac{π^2}{6}$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。