結果
| 問題 | No.959 tree and fire |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-22 02:13:33 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 186 bytes |
| 記録 | |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2026-04-04 04:34:53 |
| 合計ジャッジ時間 | 3,054 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 53 WA * 1 |
ソースコード
N, M = map(int, input().split())
P = float(input())
if N==1:
print(2*P**2+(M-2)*P**3)
elif M==1:
print(2*P**2+(N-2)*P**3)
else:
print(4*P**3+2*(N+M-4)*P**4+(N-2)*(M-2)*P**5)