結果
| 問題 |
No.1408 Nice Dice Game
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 21:04:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 409 bytes |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 82,348 KB |
| 実行使用メモリ | 75,424 KB |
| 最終ジャッジ日時 | 2025-03-20 21:04:44 |
| 合計ジャッジ時間 | 4,949 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 TLE * 1 |
ソースコード
import sys
def compute_zeta(s):
if s >= 54:
return 1.0
sum_z = 0.0
k = 1
while True:
term = 1.0 / (k ** s)
if term < 1e-20:
break
sum_z += term
k += 1
return sum_z
def main():
N = int(sys.stdin.readline())
s = N + 2
zeta_value = compute_zeta(s)
print("{0:.9f}".format(zeta_value))
if __name__ == "__main__":
main()
lam6er