結果

問題 No.1273 はじめのζ関数
ユーザー NatsubiSogan
提出日時 2020-10-30 21:46:32
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 1,133 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 58,412 KB
最終ジャッジ日時 2024-07-22 00:05:12
合計ジャッジ時間 47,121 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

import scipy.special
x = int(input())
ans = 0
l = [0]
for i in range(2, 10000):
    cur = scipy.special.zeta(i) - 1
    ans += cur
    l.append(l[-1] + cur)
if x == 2:
    print(1000000)
else:   
    print(int((ans - l[x - 2]) * 10 ** 6))
0