結果

問題 No.1235 ζ関数
ユーザー realDivineJKrealDivineJK
提出日時 2020-09-21 15:04:40
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 286 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 11,764 KB
実行使用メモリ 10,072 KB
最終ジャッジ日時 2023-10-19 18:02:06
合計ジャッジ時間 33,706 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 962 ms
10,072 KB
testcase_01 AC 1,492 ms
10,072 KB
testcase_02 TLE -
testcase_03 AC 1,476 ms
10,072 KB
testcase_04 AC 927 ms
10,072 KB
testcase_05 AC 1,973 ms
10,072 KB
testcase_06 AC 1,368 ms
10,072 KB
testcase_07 AC 1,586 ms
10,072 KB
testcase_08 AC 1,466 ms
10,072 KB
testcase_09 AC 1,765 ms
10,072 KB
testcase_10 AC 1,451 ms
10,072 KB
testcase_11 AC 1,499 ms
10,072 KB
testcase_12 AC 1,277 ms
10,072 KB
testcase_13 AC 1,787 ms
10,072 KB
testcase_14 AC 1,784 ms
10,072 KB
testcase_15 AC 1,643 ms
10,072 KB
testcase_16 AC 968 ms
10,072 KB
testcase_17 AC 1,508 ms
10,072 KB
testcase_18 AC 1,408 ms
10,072 KB
testcase_19 AC 1,776 ms
10,072 KB
testcase_20 AC 1,463 ms
10,072 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