結果
| 問題 | No.208 王将 |
| コンテスト | |
| ユーザー |
Tawara
|
| 提出日時 | 2015-05-15 23:50:26 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 308 bytes |
| 記録 | |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 76,968 KB |
| 最終ジャッジ日時 | 2025-12-03 15:08:37 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 WA * 3 |
ソースコード
x,y = map(int,raw_input().split(" "))
x2,y2 = map(int,raw_input().split(" "))
if x == x2 == 0 or y == y2 == 0:
print abs(x) + abs(y)
else:
if (x - x2) * x2 > 0 and (y - y2) * 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))
Tawara