結果

問題 No.149 碁石の移動
ユーザー syunsuke
提出日時 2019-06-15 10:50:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-17 16:00:37
合計ジャッジ時間 1,602 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

AW,AB=map(int,input().split())
BW,BB=map(int,input().split())
C,D=map(int,input().split())

boxA=AW+AB
boxB=BW+BB

if C<=AB:
    if D>=BW:
        print(AW+BW)
    else:
        print(AW+D)
else:
    BW+=(C-AB)
    AW-=(C-AB)
    if D>=BW:
        print(AW+BW)
    else:
        print(AW+D)
0