結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,176 KB
testcase_01 AC 62 ms
71,320 KB
testcase_02 AC 60 ms
71,172 KB
testcase_03 AC 58 ms
71,328 KB
testcase_04 AC 58 ms
71,352 KB
testcase_05 AC 57 ms
71,368 KB
testcase_06 AC 60 ms
71,328 KB
testcase_07 AC 60 ms
71,228 KB
testcase_08 AC 59 ms
71,352 KB
testcase_09 AC 62 ms
71,544 KB
testcase_10 AC 59 ms
71,096 KB
testcase_11 AC 60 ms
71,348 KB
testcase_12 AC 60 ms
71,220 KB
testcase_13 AC 62 ms
71,400 KB
testcase_14 AC 63 ms
71,088 KB
testcase_15 AC 64 ms
71,324 KB
testcase_16 WA -
testcase_17 AC 60 ms
71,400 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 - 1
sum_w = 1 + width * k

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

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