結果
| 問題 | No.813 ユキちゃんの冒険 |
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2019-04-12 23:24:46 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 82,468 KB |
| 実行使用メモリ | 727,164 KB |
| 最終ジャッジ日時 | 2026-10-10 04:10:23 |
| 合計ジャッジ時間 | 11,491 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 1 TLE * 2 MLE * 1 -- * 21 |
ソースコード
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