結果
| 問題 | No.959 tree and fire |
| コンテスト | |
| ユーザー |
kk_1634_s
|
| 提出日時 | 2019-12-27 15:27:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 118 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-08 06:53:30 |
| 合計ジャッジ時間 | 3,607 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 54 |
ソースコード
n,m=map(int,input().split())
p=float(input())
if n==1 and m==1:
print(1-p)
elif min(n,m)-1:
print(2 * ((1-p)**2) + (max(n,m)-2) * ((1-p)**3))
else:
print(4 * ((1-p)**3) + (n+n+m+m-8) * ((1-p)**4) + (n*m-(n+n+m+m-4))*((1-p)**4))
kk_1634_s