結果

問題 No.208 王将
ユーザー roiti46
提出日時 2015-05-15 22:56:30
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-07-06 04:12:47
合計ジャッジ時間 907 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

def dist(a,b,c,d):
    return ((a - c) ** 2 + (b - d) ** 2) ** 0.5
    
x, y = map(int, raw_input().split())
x2, y2 = map(int, raw_input().split())

ans = max(abs(x), abs(y))
if x*x2 + y*y2 == 0 and abs(dist(0, 0, x2, y2) + dist(x2, y2, x, y) - dist(0, 0, x, y)) < 1e-7:
    ans += 1
print ans
0