結果

問題 No.1273 はじめのζ関数
ユーザー Eki1009Eki1009
提出日時 2020-10-30 22:25:58
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 444 bytes
コンパイル時間 260 ms
使用メモリ 81,448 KB
最終ジャッジ日時 2023-02-21 14:06:52
合計ジャッジ時間 5,831 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 123 ms
80,928 KB
testcase_01 AC 119 ms
81,028 KB
testcase_02 AC 93 ms
80,352 KB
testcase_03 AC 86 ms
75,800 KB
testcase_04 AC 115 ms
80,900 KB
testcase_05 AC 124 ms
81,448 KB
testcase_06 AC 87 ms
75,776 KB
testcase_07 AC 118 ms
80,972 KB
testcase_08 AC 87 ms
75,744 KB
testcase_09 AC 90 ms
80,328 KB
testcase_10 AC 86 ms
75,616 KB
testcase_11 AC 124 ms
81,344 KB
testcase_12 AC 124 ms
81,264 KB
testcase_13 AC 86 ms
75,900 KB
testcase_14 AC 110 ms
80,952 KB
testcase_15 AC 108 ms
80,972 KB
testcase_16 AC 109 ms
81,028 KB
testcase_17 AC 112 ms
80,800 KB
testcase_18 AC 96 ms
80,808 KB
testcase_19 AC 93 ms
80,412 KB
testcase_20 AC 85 ms
75,688 KB
testcase_21 AC 86 ms
75,788 KB
testcase_22 AC 85 ms
75,780 KB
testcase_23 AC 85 ms
75,696 KB
testcase_24 AC 85 ms
75,908 KB
testcase_25 AC 86 ms
75,572 KB
testcase_26 AC 86 ms
75,724 KB
testcase_27 AC 85 ms
75,728 KB
testcase_28 AC 85 ms
75,788 KB
testcase_29 AC 85 ms
75,720 KB
testcase_30 AC 85 ms
75,612 KB
testcase_31 AC 85 ms
75,904 KB
testcase_32 AC 85 ms
75,800 KB
testcase_33 AC 85 ms
75,760 KB
testcase_34 AC 85 ms
75,804 KB
testcase_35 AC 85 ms
75,800 KB
testcase_36 AC 85 ms
75,644 KB
testcase_37 AC 85 ms
75,764 KB
testcase_38 AC 85 ms
75,852 KB
testcase_39 AC 86 ms
75,664 KB
testcase_40 AC 124 ms
81,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
import sys
input = sys.stdin.readline
def zeta(n):
    if n == 2:
        return 10**10*(math.pi**2)/6
    if n == 4:
        return 10**10*(math.pi**4)/90
    res = 0
    for i in range(1, 1000):
        if i**n > 10**70:
            break
        res += 10**10/i**n
    return res
ans = 0
x = int(input())
if x == 2:
    print(10**6)
    exit()
for i in range(x, x+300):
    ans += zeta(i)
ans -= 300*10**10
print(int(ans//10**4))
0