No.1235 Zeta Function
レベル :
/ AI推定難易度 : 450
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-6}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : / 解いたユーザー数 136
作問者 :
PCTprobability
/ テスター :
kozy
タグ : / 解いたユーザー数 136
作問者 :
PCTprobability
/ テスター :
kozy
問題文最終更新日: 2020-09-21 15:12:59
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
You are given a positive integer $N$ that is at least $10$. Output $ζ(N)$. It is guaranteed that $ζ(N)$ converges.
Here, $ζ(N)$ is the Riemann zeta function, defined as $ζ(N)=$\( \displaystyle \sum_{i=1}^{∞}\frac{1}{i^N} \).
Input
$N$
- All inputs are positive integers.
- $10 \le N \le 10^5$
Output
Output the value of $ζ(N)$. Your output is considered correct if the smaller of its absolute error and relative error is at most $10^{-6}$.
Sample
Sample 1
Input
10
Output
1.0009945749585496
$ζ(10)=\frac{π^{10}}{93555}$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。