結果

問題 No.149 碁石の移動
ユーザー akihito0000akihito0000
提出日時 2016-08-14 16:25:02
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 432 ms
コンパイル使用メモリ 6,504 KB
実行使用メモリ 6,108 KB
最終ジャッジ日時 2023-08-25 17:46:46
合計ジャッジ時間 1,357 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
5,824 KB
testcase_01 AC 10 ms
5,824 KB
testcase_02 AC 10 ms
5,912 KB
testcase_03 AC 10 ms
5,968 KB
testcase_04 AC 10 ms
5,844 KB
testcase_05 AC 10 ms
5,944 KB
testcase_06 AC 10 ms
6,048 KB
testcase_07 AC 10 ms
5,944 KB
testcase_08 AC 9 ms
5,960 KB
testcase_09 AC 9 ms
6,108 KB
testcase_10 AC 9 ms
5,956 KB
testcase_11 AC 10 ms
5,904 KB
testcase_12 AC 10 ms
5,820 KB
testcase_13 AC 9 ms
6,104 KB
testcase_14 AC 9 ms
5,940 KB
testcase_15 AC 9 ms
5,828 KB
testcase_16 AC 12 ms
6,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
# -*- coding: utf-8 -*-

Aw, Ab = map(int, raw_input().split())
Bw, Bb = map(int, raw_input().split())
C ,  D = map(int, raw_input().split())

if Ab - C >= 0:
       	Bb += C
else:
       	Aw -= C - Ab
       	Bw += C -Ab
       	Bb += Ab
       	Ab = 0

if Bw - D >= 0:
       	print Aw + D
else:
       	print Aw + Bw
0