結果

問題 No.1235 ζ関数
ユーザー nephrologistnephrologist
提出日時 2021-02-28 13:01:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,660 KB
実行使用メモリ 54,060 KB
最終ジャッジ日時 2024-04-10 15:58:26
合計ジャッジ時間 1,571 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,132 KB
testcase_01 AC 33 ms
52,776 KB
testcase_02 AC 33 ms
53,928 KB
testcase_03 AC 33 ms
53,600 KB
testcase_04 AC 31 ms
52,604 KB
testcase_05 AC 31 ms
53,576 KB
testcase_06 AC 31 ms
52,348 KB
testcase_07 AC 31 ms
53,144 KB
testcase_08 AC 31 ms
52,944 KB
testcase_09 AC 31 ms
52,016 KB
testcase_10 AC 31 ms
53,152 KB
testcase_11 AC 30 ms
53,204 KB
testcase_12 AC 31 ms
52,540 KB
testcase_13 AC 31 ms
53,012 KB
testcase_14 AC 31 ms
53,192 KB
testcase_15 AC 31 ms
52,720 KB
testcase_16 AC 31 ms
53,148 KB
testcase_17 AC 32 ms
54,060 KB
testcase_18 AC 31 ms
52,568 KB
testcase_19 AC 31 ms
52,472 KB
testcase_20 AC 31 ms
53,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
eps=10**(-8)
pre=-1
num=1
res=0
delta=1
while delta >eps:
    delta=pow(num, -n)
    res+=delta
    num+=1
print(res) 
0