結果
問題 | No.1048 Zero (Advanced) |
ユーザー | neterukun |
提出日時 | 2020-05-08 22:43:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 548 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 87,016 KB |
実行使用メモリ | 71,616 KB |
最終ジャッジ日時 | 2023-09-17 03:15:41 |
合計ジャッジ時間 | 2,548 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 69 ms
71,308 KB |
testcase_01 | AC | 70 ms
71,444 KB |
testcase_02 | AC | 69 ms
71,448 KB |
testcase_03 | AC | 71 ms
71,616 KB |
testcase_04 | AC | 70 ms
71,496 KB |
testcase_05 | AC | 71 ms
71,588 KB |
testcase_06 | AC | 67 ms
71,380 KB |
testcase_07 | AC | 69 ms
71,364 KB |
testcase_08 | AC | 67 ms
71,428 KB |
testcase_09 | AC | 70 ms
71,244 KB |
testcase_10 | AC | 69 ms
71,504 KB |
testcase_11 | AC | 69 ms
71,168 KB |
testcase_12 | AC | 69 ms
71,528 KB |
testcase_13 | AC | 71 ms
71,388 KB |
testcase_14 | AC | 70 ms
71,520 KB |
testcase_15 | AC | 71 ms
71,520 KB |
testcase_16 | AC | 71 ms
71,524 KB |
testcase_17 | AC | 70 ms
71,208 KB |
testcase_18 | WA | - |
ソースコード
l, r, m, k = map(int, input().split()) if l == 0: print("Yes") exit() if k == 0: print("Yes") exit() if m == 1: print("Yes") exit() if l == r: if (l * k) % m == 0: print("Yes") else: print("No") exit() if l % m == r % m: print("Yes") mod_l = l % m mod_r = r % m if 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")