結果
問題 | No.1048 Zero (Advanced) |
ユーザー |
![]() |
提出日時 | 2020-05-08 23:33:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 771 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-04 01:15:48 |
合計ジャッジ時間 | 1,284 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 |
ソースコード
import sysinput = sys.stdin.readline# from collections import dequedef linput(_t=int):return list(map(_t, input().split()))def say(n):print(("No","Yes")[n%2])exit(0)def gcd(n,m):while m: n,m = m, n%mreturn ndef lcm(n,m): return n*m//gcd(n,m)def main():# N = int(input())# N,K = linput()L,R,M,K = linput()# vA = linput()# vE = [linput() for _ in [0,]*M]res = 0if K*L==0:say(1)if M==1:say(1)if (R-L)*K >= M:say(1)if L==R:if K*L%M != 0:say(0)else:say(1)if K*L%M==0 or K*R%M==0:say(1)if M > K*R:say(0)if K*L%M > K*R%M:res = 1# print(res)say(res)main()