結果

問題 No.396 クラス替え
ユーザー rlangevinrlangevin
提出日時 2023-01-19 00:12:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 1,000 ms
コード長 240 bytes
コンパイル時間 1,043 ms
コンパイル使用メモリ 86,784 KB
実行使用メモリ 71,332 KB
最終ジャッジ日時 2023-09-02 17:10:10
合計ジャッジ時間 4,072 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,140 KB
testcase_01 AC 76 ms
71,264 KB
testcase_02 AC 75 ms
71,176 KB
testcase_03 AC 75 ms
71,076 KB
testcase_04 AC 77 ms
71,256 KB
testcase_05 AC 77 ms
71,148 KB
testcase_06 AC 78 ms
71,256 KB
testcase_07 AC 75 ms
71,152 KB
testcase_08 AC 74 ms
71,072 KB
testcase_09 AC 76 ms
71,332 KB
testcase_10 AC 74 ms
71,036 KB
testcase_11 AC 73 ms
70,876 KB
testcase_12 AC 74 ms
71,204 KB
testcase_13 AC 76 ms
71,304 KB
testcase_14 AC 73 ms
71,092 KB
testcase_15 AC 76 ms
71,020 KB
testcase_16 AC 76 ms
71,256 KB
testcase_17 AC 75 ms
71,132 KB
testcase_18 AC 76 ms
70,872 KB
testcase_19 AC 74 ms
71,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x):
    q = x // M
    if q % 2:
        return M - 1 - x % M
    else:
        return x % M
    

N, M = map(int, input().split())
X, Y = map(int, input().split())
X, Y = X - 1, Y - 1
print("YES") if f(X) == f(Y) else print("NO")    
0