結果
問題 |
No.1273 はじめのζ関数
|
ユーザー |
![]() |
提出日時 | 2025-04-15 22:27:34 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 288 ms |
コンパイル使用メモリ | 81,752 KB |
実行使用メモリ | 66,012 KB |
最終ジャッジ日時 | 2025-04-15 22:30:04 |
合計ジャッジ時間 | 5,334 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 1 |
other | AC * 20 TLE * 1 -- * 19 |
ソースコード
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))