結果

問題 No.1273 はじめのζ関数
ユーザー Eki1009Eki1009
提出日時 2020-10-30 22:25:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 444 bytes
コンパイル時間 1,061 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 77,152 KB
最終ジャッジ日時 2023-09-29 07:02:28
合計ジャッジ時間 5,237 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
76,636 KB
testcase_01 AC 108 ms
76,568 KB
testcase_02 AC 81 ms
75,796 KB
testcase_03 AC 71 ms
71,140 KB
testcase_04 AC 103 ms
76,532 KB
testcase_05 AC 113 ms
77,152 KB
testcase_06 AC 74 ms
71,708 KB
testcase_07 AC 104 ms
76,548 KB
testcase_08 AC 73 ms
71,600 KB
testcase_09 AC 77 ms
75,720 KB
testcase_10 AC 75 ms
71,604 KB
testcase_11 AC 111 ms
76,732 KB
testcase_12 AC 111 ms
76,476 KB
testcase_13 AC 72 ms
71,292 KB
testcase_14 AC 98 ms
76,520 KB
testcase_15 AC 96 ms
76,608 KB
testcase_16 AC 97 ms
76,400 KB
testcase_17 AC 101 ms
76,548 KB
testcase_18 AC 80 ms
75,964 KB
testcase_19 AC 81 ms
75,840 KB
testcase_20 AC 67 ms
71,372 KB
testcase_21 AC 69 ms
71,112 KB
testcase_22 AC 69 ms
71,532 KB
testcase_23 AC 72 ms
71,768 KB
testcase_24 AC 73 ms
71,288 KB
testcase_25 AC 71 ms
71,468 KB
testcase_26 AC 71 ms
71,164 KB
testcase_27 AC 70 ms
71,524 KB
testcase_28 AC 72 ms
71,436 KB
testcase_29 AC 73 ms
71,144 KB
testcase_30 AC 73 ms
71,724 KB
testcase_31 AC 73 ms
71,392 KB
testcase_32 AC 70 ms
71,344 KB
testcase_33 AC 72 ms
71,456 KB
testcase_34 AC 71 ms
71,416 KB
testcase_35 AC 69 ms
71,140 KB
testcase_36 AC 71 ms
71,160 KB
testcase_37 AC 70 ms
71,412 KB
testcase_38 AC 69 ms
71,344 KB
testcase_39 AC 72 ms
71,564 KB
testcase_40 AC 111 ms
77,104 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