結果

問題 No.1273 はじめのζ関数
ユーザー tanon710tanon710
提出日時 2020-10-30 22:22:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 86,672 KB
実行使用メモリ 76,300 KB
最終ジャッジ日時 2023-09-29 06:48:29
合計ジャッジ時間 6,532 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
75,980 KB
testcase_01 AC 150 ms
76,044 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 145 ms
75,972 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 145 ms
76,032 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 150 ms
76,300 KB
testcase_12 AC 146 ms
75,908 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 146 ms
75,772 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 77 ms
71,056 KB
testcase_22 AC 76 ms
70,888 KB
testcase_23 AC 76 ms
71,156 KB
testcase_24 AC 76 ms
71,196 KB
testcase_25 AC 77 ms
70,932 KB
testcase_26 AC 75 ms
71,196 KB
testcase_27 AC 76 ms
70,940 KB
testcase_28 AC 80 ms
70,988 KB
testcase_29 AC 77 ms
70,940 KB
testcase_30 AC 77 ms
70,940 KB
testcase_31 AC 76 ms
70,928 KB
testcase_32 AC 74 ms
71,136 KB
testcase_33 AC 74 ms
71,192 KB
testcase_34 AC 77 ms
71,160 KB
testcase_35 AC 77 ms
70,916 KB
testcase_36 AC 76 ms
70,916 KB
testcase_37 AC 77 ms
71,132 KB
testcase_38 AC 79 ms
71,132 KB
testcase_39 AC 79 ms
70,800 KB
testcase_40 AC 149 ms
76,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

def zeta(n):
    if n==2:
        return math.pi**2/6-1
    elif n==3:
        return 0.202056903159594
    else:
        ret=0
        for i in range(2,200):
            ret+=1/(i**n)
        return ret

n=int(input())
if n>=200:
    print(0)
else:
    ans=0
    for i in range(n,200):
        ans+=zeta(i)
    print(int(str(ans)[2:8]))
0