結果

問題 No.1273 はじめのζ関数
ユーザー lam6er
提出日時 2025-04-16 15:58:53
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 318 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 82,044 KB
実行使用メモリ 65,012 KB
最終ジャッジ日時 2025-04-16 16:01:02
合計ジャッジ時間 4,874 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 1
other AC * 20 TLE * 1 -- * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

x = int(input())
s = 0.0
k = 2
x_minus_1 = x - 1
while True:
    k_float = float(k)
    denominator = (k_float ** x_minus_1) * (k - 1)
    if denominator == 0:
        term = 0.0
    else:
        term = 1.0 / denominator
    if term < 1e-20:
        break
    s += term
    k += 1

result = s * 1e6
print(int(result))
0