結果

問題 No.208 王将
コンテスト
ユーザー Tawara
提出日時 2015-05-16 00:42:45
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 59 ms / 1,000 ms
+ 452µs
コード長 213 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 66 ms
コンパイル使用メモリ 80,512 KB
実行使用メモリ 80,768 KB
最終ジャッジ日時 2026-07-17 14:48:27
合計ジャッジ時間 3,038 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

x,y = map(int,raw_input().split(" "))
x2,y2 = map(int,raw_input().split(" "))
ax = abs(x)
ay = abs(y)
if (x-x2)*x2 > 0 and (y - y2)*y2 > 0 and ax == ay and abs(x2) == abs(y2):
	print ax + 1
else:
	print max(ax,ay)
0