No.1540 Series Toy
問題文最終更新日: 2021-06-06 16:34:10
English (AI translation)
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
ゅゅちゃんお誕生日コンテスト
(順位表)
の他の問題:
Problem Statement
Seeing Rumenaru trying to give Yuyu an integral toy as a birthday present, Sounansha decided to give a toy containing a series as a present.
When a sequence of positive integers $A=(A_1,\ldots,A_N)$ of length $N$ is put into this toy, it outputs the value of $\displaystyle\sum_{i=0}^\infty\binom{2i}i\frac1{16^i}\sum_{j=1}^N\frac{A_j}{2i+j}$. However, Sounansha has become worried about whether this toy is working properly. Therefore, please write a program that finds the value the toy would output when working properly. It can be proved that the value returned by this toy can always be expressed as $a+b\sqrt{3}+c\pi$ using rational numbers $a,b,c$, so output these as described in the Notes. Here, $\displaystyle\binom{2i}i:=\frac{(2i)!}{i!^2}$. Furthermore, it can be proved that the only rational numbers $p,q,r$ satisfying $\displaystyle p+q\sqrt3+r\pi=0$ are $p=q=r=0$.Notes
When outputting a rational number, first express it as a fraction $\displaystyle\frac pq$. Here, $p,q$ are integers, and $q$ must not be divisible by $998244353$ (under the constraints of this problem, such a representation is always possible). Then, output the unique integer $k$ satisfying $qk\equiv p \left(\text{mod}\ 998244353\right)$ that is at least $0$ and less than $998244353$.Constraints
Input
$N$ $A_1\ \ldots\ A_N$
Output
Output the $3$ rational numbers $a,b,c$ satisfying $\displaystyle\sum_{i=0}^\infty\binom{2i}i\frac1{16^i}\sum_{j=1}^N\frac{A_j}{2i+j}=a+b\sqrt{3}+c\pi$, separated by spaces.
Sample
Sample 1
Input
1 3
Output
0 0 1
The value of the infinite series is $\pi$.
Sample 2
Input
5 1 11 111 1111 11111
Output
665508130 499076489 332770414
The value of the infinite series is $\displaystyle\frac{35684}3-\frac{91375}2\sqrt{3}+\frac{66889}3\pi$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
57tggx
logx
Re_menal2
とりゐ