結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,256 KB
testcase_01 AC 68 ms
71,064 KB
testcase_02 AC 69 ms
71,180 KB
testcase_03 AC 67 ms
71,360 KB
testcase_04 AC 70 ms
71,324 KB
testcase_05 AC 68 ms
71,296 KB
testcase_06 AC 69 ms
71,252 KB
testcase_07 AC 68 ms
71,488 KB
testcase_08 AC 71 ms
71,472 KB
testcase_09 AC 70 ms
71,472 KB
testcase_10 AC 71 ms
71,372 KB
testcase_11 AC 67 ms
71,068 KB
testcase_12 AC 70 ms
71,324 KB
testcase_13 AC 69 ms
71,268 KB
testcase_14 AC 70 ms
71,384 KB
testcase_15 AC 70 ms
71,312 KB
testcase_16 AC 69 ms
71,464 KB
testcase_17 AC 69 ms
71,452 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 == 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