結果
問題 |
No.1273 はじめのζ関数
|
ユーザー |
|
提出日時 | 2020-10-30 22:25:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 429 bytes |
コンパイル時間 | 546 ms |
コンパイル使用メモリ | 82,564 KB |
実行使用メモリ | 84,680 KB |
最終ジャッジ日時 | 2024-07-22 01:37:27 |
合計ジャッジ時間 | 17,281 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | AC * 38 WA * 1 RE * 1 |
ソースコード
import math import decimal def zeta(n): if n==2: return math.pi**2/6-1 elif n==3: return 0.202056903159594 else: ret=decimal.Decimal(0) for i in range(2,100): ret+=decimal.Decimal(1)/decimal.Decimal(i**n) return ret n=int(input()) if n>=100: print(0) else: ans=decimal.Decimal(0) for i in range(n,300): ans+=zeta(i) print(int(ans*(10**6)))