結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー vwxyzvwxyz
提出日時 2023-05-25 02:00:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 781 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 77,020 KB
最終ジャッジ日時 2023-08-25 15:53:10
合計ジャッジ時間 7,985 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
71,656 KB
testcase_01 AC 90 ms
71,644 KB
testcase_02 AC 90 ms
71,724 KB
testcase_03 AC 100 ms
76,896 KB
testcase_04 AC 110 ms
76,824 KB
testcase_05 AC 100 ms
76,856 KB
testcase_06 AC 97 ms
76,740 KB
testcase_07 AC 94 ms
76,632 KB
testcase_08 AC 98 ms
76,904 KB
testcase_09 AC 96 ms
76,852 KB
testcase_10 AC 100 ms
76,700 KB
testcase_11 AC 96 ms
76,840 KB
testcase_12 AC 97 ms
76,900 KB
testcase_13 AC 97 ms
76,800 KB
testcase_14 AC 96 ms
76,964 KB
testcase_15 AC 118 ms
76,900 KB
testcase_16 AC 101 ms
76,860 KB
testcase_17 AC 120 ms
76,964 KB
testcase_18 AC 106 ms
76,800 KB
testcase_19 AC 104 ms
76,956 KB
testcase_20 AC 99 ms
77,020 KB
testcase_21 AC 108 ms
76,660 KB
testcase_22 AC 98 ms
76,716 KB
testcase_23 AC 101 ms
76,824 KB
testcase_24 AC 96 ms
76,960 KB
testcase_25 AC 107 ms
76,960 KB
testcase_26 AC 98 ms
76,860 KB
testcase_27 AC 97 ms
76,760 KB
testcase_28 AC 111 ms
76,660 KB
testcase_29 AC 107 ms
76,988 KB
testcase_30 AC 118 ms
76,864 KB
testcase_31 AC 106 ms
76,848 KB
testcase_32 AC 97 ms
76,876 KB
testcase_33 AC 92 ms
71,884 KB
testcase_34 AC 90 ms
71,816 KB
testcase_35 AC 90 ms
71,936 KB
testcase_36 AC 130 ms
76,980 KB
testcase_37 AC 92 ms
71,808 KB
testcase_38 AC 90 ms
71,628 KB
testcase_39 AC 96 ms
71,908 KB
testcase_40 AC 91 ms
71,808 KB
testcase_41 AC 89 ms
71,608 KB
testcase_42 AC 91 ms
71,604 KB
testcase_43 AC 92 ms
71,460 KB
testcase_44 AC 91 ms
71,432 KB
testcase_45 AC 92 ms
71,608 KB
testcase_46 AC 91 ms
71,648 KB
testcase_47 AC 91 ms
71,852 KB
testcase_48 AC 90 ms
71,556 KB
testcase_49 AC 94 ms
71,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline=sys.stdin.readline
from collections import defaultdict

def Divisors(N):
    divisors=[]
    for i in range(1,N+1):
        if i**2>=N:
            break
        elif N%i==0:
            divisors.append(i)
    if i**2==N:
        divisors+=[i]+[N//i for i in divisors[::-1]]
    else:
        divisors+=[N//i for i in divisors[::-1]]
    return divisors

def Factorize(N):
    assert N>=1
    factors=defaultdict(int)
    for p in range(2,N):
        if p**2>N:
            break
        while N%p==0:
            factors[p]+=1
            N//=p
    if N!=1:
        factors[N]+=1
    return factors

X,A,Y,B=map(int,readline().split())
factX=Factorize(X)
factY=Factorize(Y)
ans="Yes"
for p,e in factY.items():
    if A*factX[p]<e*B:
        ans="No"
print(ans)
0