結果
| 問題 |
No.2123 Chalk Breaker
|
| ユーザー |
|
| 提出日時 | 2022-11-10 00:03:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 291 bytes |
| コンパイル時間 | 287 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 25,664 KB |
| 最終ジャッジ日時 | 2024-07-23 04:50:32 |
| 合計ジャッジ時間 | 6,681 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | TLE * 1 -- * 8 |
ソースコード
import sys
sys.setrecursionlimit(10**6)
E = dict()
E[0] = 0.0
E[1] = 1.0
def rec(x):
if E.get(x, None) is not None:
return E[x]
res = 0.0
for i in range(x):
res += (rec(i) + rec(x - i - 1)) / (x - 1)
E[x] = res
return res
n = int(input())
print(rec(n))