結果

問題 No.959 tree and fire
ユーザー roarisroaris
提出日時 2019-12-22 02:15:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 87,360 KB
実行使用メモリ 72,112 KB
最終ジャッジ日時 2023-10-11 11:13:41
合計ジャッジ時間 7,292 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,384 KB
testcase_01 AC 72 ms
71,900 KB
testcase_02 AC 74 ms
71,768 KB
testcase_03 AC 71 ms
71,904 KB
testcase_04 AC 73 ms
71,768 KB
testcase_05 AC 73 ms
71,884 KB
testcase_06 AC 72 ms
71,748 KB
testcase_07 AC 71 ms
71,664 KB
testcase_08 AC 72 ms
71,888 KB
testcase_09 AC 71 ms
71,812 KB
testcase_10 AC 71 ms
71,580 KB
testcase_11 AC 71 ms
72,112 KB
testcase_12 AC 72 ms
71,860 KB
testcase_13 AC 73 ms
71,916 KB
testcase_14 AC 71 ms
72,020 KB
testcase_15 AC 73 ms
71,808 KB
testcase_16 AC 72 ms
71,824 KB
testcase_17 AC 73 ms
71,804 KB
testcase_18 AC 72 ms
71,776 KB
testcase_19 AC 71 ms
71,804 KB
testcase_20 AC 72 ms
71,968 KB
testcase_21 AC 72 ms
71,772 KB
testcase_22 AC 73 ms
71,772 KB
testcase_23 AC 74 ms
71,608 KB
testcase_24 AC 73 ms
72,092 KB
testcase_25 AC 75 ms
71,912 KB
testcase_26 AC 74 ms
71,576 KB
testcase_27 AC 73 ms
71,880 KB
testcase_28 AC 74 ms
71,920 KB
testcase_29 AC 74 ms
71,808 KB
testcase_30 AC 74 ms
71,912 KB
testcase_31 AC 75 ms
71,896 KB
testcase_32 AC 74 ms
71,672 KB
testcase_33 AC 73 ms
71,756 KB
testcase_34 AC 74 ms
71,584 KB
testcase_35 AC 73 ms
71,580 KB
testcase_36 AC 75 ms
71,880 KB
testcase_37 AC 73 ms
71,620 KB
testcase_38 AC 74 ms
71,808 KB
testcase_39 AC 75 ms
71,620 KB
testcase_40 AC 75 ms
71,576 KB
testcase_41 AC 74 ms
71,884 KB
testcase_42 AC 76 ms
71,608 KB
testcase_43 AC 74 ms
71,572 KB
testcase_44 AC 74 ms
71,640 KB
testcase_45 AC 75 ms
71,800 KB
testcase_46 AC 74 ms
71,508 KB
testcase_47 AC 74 ms
71,640 KB
testcase_48 AC 73 ms
71,800 KB
testcase_49 AC 73 ms
71,636 KB
testcase_50 AC 72 ms
71,472 KB
testcase_51 AC 74 ms
71,664 KB
testcase_52 AC 74 ms
71,548 KB
testcase_53 AC 74 ms
71,232 KB
testcase_54 AC 76 ms
71,824 KB
testcase_55 AC 74 ms
71,872 KB
testcase_56 AC 75 ms
71,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
P = float(input())

if N==1 and M==1:
    print(P)
elif 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)
0