結果

問題 No.149 碁石の移動
ユーザー tabataba
提出日時 2016-04-13 23:22:58
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 6,668 KB
実行使用メモリ 6,116 KB
最終ジャッジ日時 2023-08-25 17:43:49
合計ジャッジ時間 1,088 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
5,848 KB
testcase_01 AC 10 ms
6,064 KB
testcase_02 AC 11 ms
5,920 KB
testcase_03 AC 10 ms
6,072 KB
testcase_04 AC 10 ms
5,868 KB
testcase_05 AC 11 ms
5,940 KB
testcase_06 AC 11 ms
5,844 KB
testcase_07 AC 10 ms
5,832 KB
testcase_08 AC 9 ms
6,024 KB
testcase_09 AC 10 ms
5,868 KB
testcase_10 AC 10 ms
5,960 KB
testcase_11 AC 10 ms
6,008 KB
testcase_12 AC 10 ms
6,116 KB
testcase_13 AC 10 ms
6,076 KB
testcase_14 AC 10 ms
5,940 KB
testcase_15 AC 10 ms
6,092 KB
testcase_16 AC 10 ms
5,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a=map(int,raw_input().split())
b=map(int,raw_input().split())
c,d=map(int,raw_input().split())

if a[1]<c:
	b[1]+=a[1]
	a[0]-=c-a[1]
	b[0]+=c-a[1]
	a[1]=0
else:
	a[1]-=c
	b[1]+=c

if b[0]<d:
	print a[0]+b[0]
else:
	print a[0]+d
0