結果

問題 No.959 tree and fire
ユーザー tamatotamato
提出日時 2019-12-22 12:11:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 72,072 KB
最終ジャッジ日時 2023-10-12 02:54:28
合計ジャッジ時間 6,809 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,220 KB
testcase_01 AC 68 ms
71,644 KB
testcase_02 WA -
testcase_03 AC 67 ms
71,836 KB
testcase_04 AC 74 ms
71,932 KB
testcase_05 AC 68 ms
71,808 KB
testcase_06 AC 74 ms
71,784 KB
testcase_07 AC 75 ms
71,880 KB
testcase_08 AC 73 ms
71,872 KB
testcase_09 AC 74 ms
71,564 KB
testcase_10 AC 73 ms
71,772 KB
testcase_11 AC 78 ms
71,816 KB
testcase_12 WA -
testcase_13 AC 75 ms
71,648 KB
testcase_14 AC 76 ms
71,652 KB
testcase_15 AC 74 ms
71,804 KB
testcase_16 AC 74 ms
71,532 KB
testcase_17 AC 74 ms
71,788 KB
testcase_18 AC 72 ms
71,768 KB
testcase_19 AC 68 ms
71,976 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 69 ms
71,656 KB
testcase_23 AC 69 ms
71,724 KB
testcase_24 AC 67 ms
71,840 KB
testcase_25 AC 67 ms
71,968 KB
testcase_26 AC 67 ms
71,624 KB
testcase_27 AC 68 ms
71,764 KB
testcase_28 AC 69 ms
71,604 KB
testcase_29 AC 68 ms
71,720 KB
testcase_30 AC 68 ms
71,892 KB
testcase_31 AC 72 ms
71,600 KB
testcase_32 AC 73 ms
71,724 KB
testcase_33 AC 73 ms
71,860 KB
testcase_34 AC 74 ms
71,804 KB
testcase_35 AC 74 ms
71,720 KB
testcase_36 AC 72 ms
71,668 KB
testcase_37 AC 73 ms
71,764 KB
testcase_38 AC 74 ms
71,964 KB
testcase_39 AC 71 ms
71,876 KB
testcase_40 AC 67 ms
71,868 KB
testcase_41 AC 67 ms
71,764 KB
testcase_42 AC 72 ms
71,864 KB
testcase_43 AC 73 ms
71,648 KB
testcase_44 AC 69 ms
71,880 KB
testcase_45 AC 68 ms
71,492 KB
testcase_46 AC 68 ms
71,656 KB
testcase_47 AC 69 ms
71,740 KB
testcase_48 AC 68 ms
71,524 KB
testcase_49 AC 68 ms
71,336 KB
testcase_50 AC 68 ms
71,456 KB
testcase_51 AC 69 ms
71,604 KB
testcase_52 AC 68 ms
71,340 KB
testcase_53 AC 67 ms
71,348 KB
testcase_54 AC 75 ms
71,776 KB
testcase_55 AC 72 ms
71,564 KB
testcase_56 AC 67 ms
71,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if N == M == 1:
    print(p)
elif N == 1:
    print(p**3 * (M-2) + p**2 * 2)
elif M == 1:
    print(p**3 + (N-1) + p**2 * 2)
else:
    print(p**5 * (N-2) * (M-2) + p**4 * ((N-2)*2 + (M-2)*2) + p**3 * 4)
0