結果

問題 No.1273 はじめのζ関数
ユーザー nagissnagiss
提出日時 2020-10-30 21:42:41
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 86,284 KB
実行使用メモリ 76,892 KB
最終ジャッジ日時 2023-09-29 05:34:42
合計ジャッジ時間 6,539 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
76,676 KB
testcase_01 AC 114 ms
76,444 KB
testcase_02 AC 117 ms
76,620 KB
testcase_03 AC 112 ms
76,228 KB
testcase_04 AC 111 ms
76,528 KB
testcase_05 AC 116 ms
76,888 KB
testcase_06 AC 109 ms
76,384 KB
testcase_07 AC 109 ms
76,340 KB
testcase_08 AC 108 ms
76,040 KB
testcase_09 AC 111 ms
76,296 KB
testcase_10 AC 111 ms
76,380 KB
testcase_11 AC 116 ms
76,628 KB
testcase_12 AC 111 ms
76,044 KB
testcase_13 AC 111 ms
76,124 KB
testcase_14 AC 114 ms
76,380 KB
testcase_15 AC 114 ms
76,368 KB
testcase_16 AC 114 ms
76,404 KB
testcase_17 AC 112 ms
76,384 KB
testcase_18 AC 109 ms
76,216 KB
testcase_19 AC 111 ms
76,448 KB
testcase_20 WA -
testcase_21 AC 109 ms
76,024 KB
testcase_22 AC 111 ms
76,120 KB
testcase_23 AC 117 ms
75,992 KB
testcase_24 AC 111 ms
76,240 KB
testcase_25 AC 111 ms
76,128 KB
testcase_26 AC 110 ms
75,956 KB
testcase_27 AC 113 ms
76,200 KB
testcase_28 AC 110 ms
76,124 KB
testcase_29 AC 106 ms
76,356 KB
testcase_30 AC 107 ms
76,128 KB
testcase_31 AC 110 ms
76,112 KB
testcase_32 AC 110 ms
76,016 KB
testcase_33 AC 113 ms
76,140 KB
testcase_34 AC 111 ms
76,104 KB
testcase_35 AC 110 ms
76,040 KB
testcase_36 AC 110 ms
76,380 KB
testcase_37 AC 108 ms
76,224 KB
testcase_38 AC 115 ms
76,160 KB
testcase_39 AC 113 ms
76,048 KB
testcase_40 AC 119 ms
76,800 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 > 1e18:
            break
        res += 1 / denom
    return res

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

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