結果
問題 |
No.240 ナイト散歩
|
ユーザー |
![]() |
提出日時 | 2015-08-11 00:04:10 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 417 bytes |
コンパイル時間 | 452 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 06:35:24 |
合計ジャッジ時間 | 1,165 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 WA * 3 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict; use warnings; my ($x, $y) = split / /, <>; if($x < 0) { $x *= -1; } if($y < 0) { $y *= -1; } if($x > $y) { ($x, $y) = ($y, $x); } if(($x > 6)||($y > 6)) { print "NO\n"; exit; } if((($x == 2)&&($y == 2))||(($x == 4)&&($y == 4))||(($x == 5)&&(($y == 1)||($y == 3)||($y == 5)))||($x == 6)&&((($y == 0)||($y == 2)||($y == 4)||($y == 5)||($y == 6)))) { print "NO\n"; exit; } print "YES\n"; exit;