結果
| 問題 |
No.1273 はじめのζ関数
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:35:12 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 384 bytes |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 82,760 KB |
| 実行使用メモリ | 75,952 KB |
| 最終ジャッジ日時 | 2025-03-20 20:36:33 |
| 合計ジャッジ時間 | 3,588 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 21 RE * 19 |
ソースコード
x = int(input())
if x == 2:
print(1000000)
else:
total = 0.0
k = 2
eps = 1e-20 # Adjust this if necessary
while True:
denom = (k ** (x - 1)) * (k - 1)
if denom == float('inf'):
break
term = 1.0 / denom
if term < eps:
break
total += term
k += 1
result = total * 1e6
print(int(result))
lam6er