結果

問題 No.1048 Zero (Advanced)
ユーザー neterukunneterukun
提出日時 2020-05-08 22:27:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 71,560 KB
最終ジャッジ日時 2023-09-17 03:07:51
合計ジャッジ時間 2,567 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,180 KB
testcase_01 AC 74 ms
71,256 KB
testcase_02 AC 70 ms
71,556 KB
testcase_03 AC 71 ms
71,192 KB
testcase_04 AC 72 ms
71,436 KB
testcase_05 AC 69 ms
71,560 KB
testcase_06 AC 69 ms
71,460 KB
testcase_07 AC 69 ms
71,320 KB
testcase_08 AC 71 ms
71,428 KB
testcase_09 AC 71 ms
71,484 KB
testcase_10 AC 70 ms
71,196 KB
testcase_11 AC 69 ms
71,196 KB
testcase_12 AC 69 ms
71,260 KB
testcase_13 AC 70 ms
71,184 KB
testcase_14 AC 70 ms
71,472 KB
testcase_15 AC 71 ms
71,188 KB
testcase_16 WA -
testcase_17 AC 68 ms
71,372 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

l, r, m, k = map(int, input().split())

mod_l = l % m
mod_r = r % m

if k == 0:
    print("Yes")
    exit()
    
if l != r and mod_l >= mod_r:
    print("Yes")
    exit()

width = mod_r - mod_l
sum_w = 1 + width * k

if sum_w >= m:
    print("Yes")
    exit()

l = (mod_l * k) % m
if l + (sum_w - 1) >= m:
    print("Yes")
else:
    print("No")
0