結果

問題 No.149 碁石の移動
ユーザー matriematrie
提出日時 2020-12-01 08:05:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 317 bytes
コンパイル時間 543 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 7,916 KB
最終ジャッジ日時 2023-10-11 03:21:11
合計ジャッジ時間 2,077 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,768 KB
testcase_01 AC 15 ms
7,856 KB
testcase_02 WA -
testcase_03 AC 15 ms
7,864 KB
testcase_04 WA -
testcase_05 AC 15 ms
7,772 KB
testcase_06 AC 16 ms
7,916 KB
testcase_07 WA -
testcase_08 AC 16 ms
7,764 KB
testcase_09 AC 15 ms
7,736 KB
testcase_10 AC 15 ms
7,896 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

Aw,Ab = map(int, input().split())
Bw,Bb = map(int, input().split())
c,d = map(int, input().split())

#print([Aw,Ab,Bw,Bb],c)
Aw -= max(0,c-Ab)
Ab -= min(Ab,c)
Bw += max(0,c-Ab)
Bb += min(Ab,c)
#print([Aw,Ab,Bw,Bb],d)
Bw -= min(Bw,d)
Bb -= max(0,d-Bw)
Aw += min(Bw,d)
Ab += max(0,d-Bw)
#print([Aw,Ab,Bw,Bb])
print(Aw)
0