結果

問題 No.149 碁石の移動
ユーザー daku9640daku9640
提出日時 2016-10-11 05:27:46
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 10,576 KB
実行使用メモリ 7,916 KB
最終ジャッジ日時 2023-08-25 17:48:09
合計ジャッジ時間 1,231 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,760 KB
testcase_01 AC 15 ms
7,788 KB
testcase_02 AC 16 ms
7,688 KB
testcase_03 AC 15 ms
7,788 KB
testcase_04 AC 16 ms
7,844 KB
testcase_05 AC 16 ms
7,692 KB
testcase_06 AC 16 ms
7,816 KB
testcase_07 AC 16 ms
7,764 KB
testcase_08 AC 16 ms
7,740 KB
testcase_09 AC 15 ms
7,836 KB
testcase_10 AC 15 ms
7,780 KB
testcase_11 AC 15 ms
7,884 KB
testcase_12 AC 16 ms
7,768 KB
testcase_13 AC 15 ms
7,916 KB
testcase_14 AC 15 ms
7,780 KB
testcase_15 AC 15 ms
7,884 KB
testcase_16 AC 15 ms
7,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Aw, Ab = list(map(int, input().split()))
Bw, Bb = list(map(int, input().split()))
C, D = list(map(int, input().split()))
if Ab < C:
    Aw = Aw + Ab - C
    Bw = Bw + C - Ab
if Bw <= D:
    Aw = Aw + Bw
else:
    Aw = Aw + D
print(Aw)
0