結果

問題 No.1235 ζ関数
ユーザー realDivineJKrealDivineJK
提出日時 2020-09-21 15:06:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 267 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 979 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 77,012 KB
最終ジャッジ日時 2023-09-06 17:16:13
合計ジャッジ時間 5,601 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 151 ms
76,736 KB
testcase_01 AC 159 ms
76,548 KB
testcase_02 AC 188 ms
76,664 KB
testcase_03 AC 182 ms
76,668 KB
testcase_04 AC 170 ms
76,624 KB
testcase_05 AC 213 ms
76,692 KB
testcase_06 AC 267 ms
76,736 KB
testcase_07 AC 194 ms
76,772 KB
testcase_08 AC 178 ms
76,728 KB
testcase_09 AC 174 ms
76,888 KB
testcase_10 AC 215 ms
76,836 KB
testcase_11 AC 205 ms
76,744 KB
testcase_12 AC 163 ms
76,752 KB
testcase_13 AC 197 ms
76,888 KB
testcase_14 AC 166 ms
76,740 KB
testcase_15 AC 163 ms
76,716 KB
testcase_16 AC 149 ms
77,012 KB
testcase_17 AC 165 ms
76,784 KB
testcase_18 AC 185 ms
76,736 KB
testcase_19 AC 164 ms
76,712 KB
testcase_20 AC 164 ms
76,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
def doubling(n, m):
    y = 1
    bas = n
    tmp = m
    while tmp:
        if tmp % 2:
            y *= bas
        bas *= bas
        tmp >>= 1
        if y == 0:
            break
    return y
S = 0
for i in range(1000000, 0, -1):
    S += doubling(1/i, N)
print(S)
0