結果
| 問題 |
No.813 ユキちゃんの冒険
|
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2019-04-12 23:24:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 349 bytes |
| コンパイル時間 | 248 ms |
| コンパイル使用メモリ | 82,184 KB |
| 実行使用メモリ | 707,688 KB |
| 最終ジャッジ日時 | 2025-01-02 03:46:40 |
| 合計ジャッジ時間 | 62,845 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 4 TLE * 13 MLE * 7 |
ソースコード
from decimal import *
n = int(input())
p = Decimal(input())
q = Decimal(input())
prob = [[Decimal(0) for i in range(n+2)] for j in range(3010)]
prob[0][1] = Decimal(1)
ret = Decimal(0)
for i in range(3000):
for j in range(1, n+1):
prob[i+1][j-1] += prob[i][j] * p
prob[i+1][j+1] += prob[i][j] * q
ret += prob[i][0]
print(ret)
fiord