結果

問題 No.208 王将
ユーザー TawaraTawara
提出日時 2015-05-15 23:38:01
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 6,660 KB
実行使用メモリ 6,124 KB
最終ジャッジ日時 2023-09-20 08:40:05
合計ジャッジ時間 1,474 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,964 KB
testcase_01 AC 12 ms
6,116 KB
testcase_02 AC 12 ms
6,068 KB
testcase_03 WA -
testcase_04 AC 12 ms
6,068 KB
testcase_05 AC 11 ms
5,908 KB
testcase_06 AC 11 ms
5,952 KB
testcase_07 AC 11 ms
6,064 KB
testcase_08 AC 11 ms
5,880 KB
testcase_09 AC 11 ms
5,976 KB
testcase_10 AC 12 ms
6,008 KB
testcase_11 AC 12 ms
5,856 KB
testcase_12 AC 11 ms
5,852 KB
testcase_13 AC 11 ms
5,852 KB
testcase_14 AC 12 ms
6,020 KB
testcase_15 WA -
testcase_16 AC 11 ms
6,020 KB
testcase_17 WA -
testcase_18 AC 11 ms
5,860 KB
testcase_19 AC 12 ms
6,124 KB
testcase_20 AC 11 ms
5,936 KB
testcase_21 AC 12 ms
6,120 KB
testcase_22 AC 11 ms
5,880 KB
testcase_23 AC 11 ms
5,996 KB
testcase_24 AC 12 ms
5,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,y = map(int,raw_input().split(" "))
x2,y2 = map(int,raw_input().split(" "))
if x == x2 == 0 or y == y2 == 0:
	print x + y
else:
	if (0 < x2 < x or x < x2 < 0) and (0 < y2 < y or y < y2 < 0):
		if abs(x) == abs(y) and abs(x2) == abs(y2):
			print abs(x) + 1
		else:
			print abs(x)
	else:
		print max(abs(x),abs(y))
0