結果

問題 No.149 碁石の移動
コンテスト
ユーザー LyricalMaestro
提出日時 2026-02-05 01:58:05
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 297 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,981 ms
コンパイル使用メモリ 20,688 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2026-02-05 02:00:45
合計ジャッジ時間 5,167 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

## https://yukicoder.me/problems/no/149


def main():
    Aw, Ab = map(int, input().split())
    Bw, Bb = map(int, input().split())
    C, D = map(int, input().split())

    d = max(0, C - Ab)
    
    answer = Aw - d + (min(Bw + d, D))
    print(answer)





if __name__ == "__main__":
    main()
0