結果
問題 |
No.396 クラス替え
|
ユーザー |
![]() |
提出日時 | 2016-07-15 23:10:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-15 04:43:06 |
合計ジャッジ時間 | 1,325 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 2 |
ソースコード
N,M = map(int,input().split()) X,Y = map(int,input().split()) X,Y = X - 1,Y - 1 if X // M % 2 == 0 and Y // M % 2 == 0: if X % M == Y % M: print('YES') else: print('NO') elif X // M % 2 == 0 and Y // M % 2 == 1: if X % M == M - 1 - (Y % M): print('YES') else: print('NO') elif X // M % 2 == 1 and Y // M % 2 == 0: if M - 1 - (X % M) == Y % M: print('YES') else: print('NO')