結果

問題 No.1048 Zero (Advanced)
ユーザー hedwig100hedwig100
提出日時 2020-05-08 21:36:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 536 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 8,596 KB
最終ジャッジ日時 2023-09-17 02:05:12
合計ジャッジ時間 1,381 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,428 KB
testcase_01 AC 20 ms
8,428 KB
testcase_02 AC 20 ms
8,440 KB
testcase_03 AC 19 ms
8,596 KB
testcase_04 AC 18 ms
8,580 KB
testcase_05 AC 19 ms
8,452 KB
testcase_06 AC 19 ms
8,432 KB
testcase_07 AC 18 ms
8,548 KB
testcase_08 AC 19 ms
8,568 KB
testcase_09 AC 19 ms
8,428 KB
testcase_10 AC 18 ms
8,448 KB
testcase_11 AC 19 ms
8,432 KB
testcase_12 AC 18 ms
8,548 KB
testcase_13 AC 19 ms
8,372 KB
testcase_14 AC 19 ms
8,572 KB
testcase_15 AC 18 ms
8,440 KB
testcase_16 AC 18 ms
8,428 KB
testcase_17 AC 18 ms
8,476 KB
testcase_18 AC 19 ms
8,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

dy = (-1,0,1,0)
dx = (0,1,0,-1)
from collections import deque

def main():
    L,R,M,K = map(int,input().split())
    if R - L >= M:
        mod_min = 0
        mod_max = M - 1
    else:
        x = L%M
        y = R%M
        if y - x >= 0:
            mod_min = x
            mod_max = y
        else:
            print('Yes')
            return
    min_tot = mod_min * K
    max_tot = mod_max * K
    if max_tot // M - (min_tot - 1) // M >= 1:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()
0