結果
| 問題 | No.959 tree and fire |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-05-06 04:57:06 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 2,000 ms |
| コード長 | 222 bytes |
| 記録 | |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2026-04-04 07:50:12 |
| 合計ジャッジ時間 | 3,280 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 54 |
ソースコード
n,m = map(int,input().split())
p = float(input())
ans = 0.0
r = [p**i for i in range(9)]
if n==m==1:
print(r[1])
elif n==1 or m==1:
print(r[2]*2+r[3]*(n*m-2))
else:
print(r[3]*4+r[4]*(n+m-4)*2+r[5]*(n-2)*(m-2))
convexineq