結果
問題 | No.240 ナイト散歩 |
ユーザー |
![]() |
提出日時 | 2017-06-25 10:39:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 484 bytes |
コンパイル時間 | 237 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-07 21:39:43 |
合計ジャッジ時間 | 1,965 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
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") else: print ("NO") elif m==6: if ot==1 or ot==3: print ("YES") else: print ("NO") else: print ("NO")