結果
問題 |
No.1271 初めての級数
|
ユーザー |
![]() |
提出日時 | 2020-10-30 22:19:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 219 bytes |
コンパイル時間 | 116 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 57,248 KB |
最終ジャッジ日時 | 2024-07-22 01:10:39 |
合計ジャッジ時間 | 6,673 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 3 -- * 10 |
ソースコード
from heapq import heappop, heappush k = int(input()) t = [] for n in range(1, 1000000): heappush(t, 1 / (n * (n + k))) while len(t) != 1: a = heappop(t) b = heappop(t) heappush(t, a + b) print(t[0])