結果

問題 No.1273 はじめのζ関数
ユーザー nagissnagiss
提出日時 2020-10-30 21:43:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 87,192 KB
実行使用メモリ 77,884 KB
最終ジャッジ日時 2023-09-29 05:37:34
合計ジャッジ時間 10,553 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 221 ms
77,628 KB
testcase_01 AC 206 ms
76,996 KB
testcase_02 AC 195 ms
77,148 KB
testcase_03 AC 202 ms
77,132 KB
testcase_04 AC 196 ms
77,184 KB
testcase_05 AC 207 ms
77,696 KB
testcase_06 AC 194 ms
76,688 KB
testcase_07 AC 197 ms
76,888 KB
testcase_08 AC 196 ms
76,744 KB
testcase_09 AC 207 ms
77,384 KB
testcase_10 AC 199 ms
76,912 KB
testcase_11 AC 212 ms
77,256 KB
testcase_12 AC 202 ms
77,056 KB
testcase_13 AC 208 ms
77,072 KB
testcase_14 AC 204 ms
77,304 KB
testcase_15 AC 203 ms
77,076 KB
testcase_16 AC 210 ms
77,284 KB
testcase_17 AC 212 ms
77,108 KB
testcase_18 AC 205 ms
77,316 KB
testcase_19 AC 219 ms
77,328 KB
testcase_20 WA -
testcase_21 AC 231 ms
77,164 KB
testcase_22 AC 212 ms
77,024 KB
testcase_23 AC 205 ms
77,204 KB
testcase_24 AC 200 ms
76,936 KB
testcase_25 AC 204 ms
76,660 KB
testcase_26 AC 210 ms
76,980 KB
testcase_27 AC 206 ms
77,100 KB
testcase_28 AC 193 ms
76,984 KB
testcase_29 AC 198 ms
76,708 KB
testcase_30 AC 198 ms
76,908 KB
testcase_31 AC 210 ms
77,060 KB
testcase_32 AC 203 ms
77,076 KB
testcase_33 AC 206 ms
77,088 KB
testcase_34 AC 199 ms
76,848 KB
testcase_35 AC 209 ms
76,956 KB
testcase_36 AC 222 ms
76,808 KB
testcase_37 AC 203 ms
77,080 KB
testcase_38 AC 208 ms
77,116 KB
testcase_39 AC 204 ms
76,916 KB
testcase_40 AC 215 ms
77,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import pi, floor

def zeta_m1(n):
    if n == 2:
        return pi*pi/6 - 1.0
    elif n == 3:
        return 0.202056903159594
    elif n == 4:
        return pi**4/90 - 1.0
    res = 0
    for i in range(2, 1000):
        denom = i ** n
        if denom > 1e20:
            break
        res += 1 / denom
    return res

X = int(input())
ans = 0
for i in range(X, 200000):
    ans += zeta_m1(i)

print(int(floor(ans*1000000)))
0