結果

問題 No.149 碁石の移動
ユーザー roiti46
提出日時 2015-02-12 23:25:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-12-24 02:43:15
合計ジャッジ時間 875 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

Aw,Ab = map(int,raw_input().split())
Bw,Bb = map(int,raw_input().split())
C,D  = map(int,raw_input().split())
ans = Aw-max(0,C-Ab)+min(D,Bw+max(C-Ab,0))
print ans
0