結果

問題 No.240 ナイト散歩
ユーザー rocoder
提出日時 2017-06-25 10:36:00
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 422 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-04 08:21:13
合計ジャッジ時間 2,145 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

def abs(p):
    if p<0:
        p*=-1
    return p
X,Y=(int(i) for i in input(). split ())
x=abs(X)
y=abs(Y)
if x<y:
    m=y
    ot=x
else:
    m=x
    ot=y
if m==0 or m==1 or m==3:
    print ("YES")
elif m<=4:
    if ot!=m:
         print ("YES")
    else:
         print("NO")
elif m==5:
    if ot==0 or ot==2 or ot==4:
        print ("YES")
elif m==6:
    if ot==1 or ot==3:
        print ("YES")
else:
    print ("NO")
0