結果

問題 No.959 tree and fire
ユーザー rlangevinrlangevin
提出日時 2023-01-22 12:18:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 72,160 KB
最終ジャッジ日時 2023-09-06 23:07:08
合計ジャッジ時間 8,198 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
71,916 KB
testcase_02 AC 71 ms
71,788 KB
testcase_03 AC 70 ms
71,944 KB
testcase_04 AC 73 ms
71,864 KB
testcase_05 AC 70 ms
72,000 KB
testcase_06 AC 70 ms
72,044 KB
testcase_07 AC 71 ms
71,748 KB
testcase_08 AC 71 ms
71,768 KB
testcase_09 AC 72 ms
71,644 KB
testcase_10 AC 72 ms
71,884 KB
testcase_11 AC 71 ms
71,608 KB
testcase_12 AC 71 ms
71,880 KB
testcase_13 AC 71 ms
71,748 KB
testcase_14 AC 70 ms
71,808 KB
testcase_15 AC 70 ms
71,976 KB
testcase_16 AC 70 ms
71,924 KB
testcase_17 AC 71 ms
71,824 KB
testcase_18 AC 71 ms
71,640 KB
testcase_19 AC 70 ms
71,592 KB
testcase_20 AC 73 ms
72,060 KB
testcase_21 AC 73 ms
71,936 KB
testcase_22 AC 73 ms
71,856 KB
testcase_23 AC 71 ms
71,644 KB
testcase_24 AC 71 ms
71,724 KB
testcase_25 AC 72 ms
71,524 KB
testcase_26 AC 72 ms
71,808 KB
testcase_27 AC 72 ms
71,744 KB
testcase_28 AC 71 ms
71,744 KB
testcase_29 AC 71 ms
72,100 KB
testcase_30 AC 72 ms
71,728 KB
testcase_31 AC 71 ms
71,800 KB
testcase_32 AC 70 ms
71,884 KB
testcase_33 AC 72 ms
71,948 KB
testcase_34 AC 71 ms
71,980 KB
testcase_35 AC 70 ms
71,880 KB
testcase_36 AC 72 ms
71,528 KB
testcase_37 AC 73 ms
71,928 KB
testcase_38 AC 72 ms
71,800 KB
testcase_39 AC 70 ms
71,860 KB
testcase_40 AC 72 ms
72,032 KB
testcase_41 AC 71 ms
72,052 KB
testcase_42 AC 71 ms
71,932 KB
testcase_43 AC 71 ms
71,528 KB
testcase_44 AC 72 ms
71,628 KB
testcase_45 AC 71 ms
71,444 KB
testcase_46 AC 70 ms
71,616 KB
testcase_47 AC 71 ms
71,640 KB
testcase_48 AC 72 ms
71,680 KB
testcase_49 AC 71 ms
71,272 KB
testcase_50 AC 71 ms
71,372 KB
testcase_51 AC 72 ms
71,152 KB
testcase_52 AC 70 ms
71,476 KB
testcase_53 AC 77 ms
71,148 KB
testcase_54 AC 73 ms
71,892 KB
testcase_55 AC 70 ms
72,028 KB
testcase_56 AC 72 ms
71,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
P = float(input())
if N >= M:
    N, M = M, N
ans = 0
if N == 1:
    ans = 2 * P ** 2 + max(0, M - 2) * P ** 3
else:
    ans = 4 * P ** 3 + 2 * (N + M - 4) * P ** 4 + (M - 2) * (N - 2) * P ** 5
print(ans)
0