結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー titiatitia
提出日時 2021-10-29 21:36:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 240 ms / 2,000 ms
コード長 532 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-16 14:19:57
合計ジャッジ時間 8,351 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,752 KB
testcase_01 AC 33 ms
10,752 KB
testcase_02 AC 32 ms
10,752 KB
testcase_03 AC 124 ms
10,752 KB
testcase_04 AC 212 ms
10,752 KB
testcase_05 AC 157 ms
10,880 KB
testcase_06 AC 161 ms
10,752 KB
testcase_07 AC 137 ms
10,880 KB
testcase_08 AC 240 ms
10,752 KB
testcase_09 AC 152 ms
10,752 KB
testcase_10 AC 203 ms
10,880 KB
testcase_11 AC 153 ms
10,880 KB
testcase_12 AC 195 ms
10,752 KB
testcase_13 AC 193 ms
10,880 KB
testcase_14 AC 76 ms
10,752 KB
testcase_15 AC 174 ms
10,752 KB
testcase_16 AC 202 ms
10,752 KB
testcase_17 AC 187 ms
10,752 KB
testcase_18 AC 203 ms
10,880 KB
testcase_19 AC 159 ms
10,752 KB
testcase_20 AC 120 ms
10,752 KB
testcase_21 AC 167 ms
10,752 KB
testcase_22 AC 152 ms
10,752 KB
testcase_23 AC 207 ms
10,752 KB
testcase_24 AC 125 ms
10,752 KB
testcase_25 AC 218 ms
10,880 KB
testcase_26 AC 192 ms
10,752 KB
testcase_27 AC 179 ms
10,880 KB
testcase_28 AC 184 ms
10,880 KB
testcase_29 AC 203 ms
10,880 KB
testcase_30 AC 225 ms
10,880 KB
testcase_31 AC 184 ms
10,752 KB
testcase_32 AC 202 ms
10,880 KB
testcase_33 AC 162 ms
10,752 KB
testcase_34 AC 162 ms
10,752 KB
testcase_35 AC 162 ms
10,752 KB
testcase_36 AC 240 ms
10,752 KB
testcase_37 AC 32 ms
10,880 KB
testcase_38 AC 31 ms
10,880 KB
testcase_39 AC 31 ms
10,752 KB
testcase_40 AC 98 ms
10,752 KB
testcase_41 AC 32 ms
10,752 KB
testcase_42 AC 31 ms
10,752 KB
testcase_43 AC 30 ms
10,752 KB
testcase_44 AC 32 ms
10,880 KB
testcase_45 AC 97 ms
10,880 KB
testcase_46 AC 115 ms
10,752 KB
testcase_47 AC 129 ms
10,880 KB
testcase_48 AC 32 ms
10,752 KB
testcase_49 AC 67 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
import math 

X,A,Y,B=map(int,input().split())

# 素因数分解

def fac(x):    
    L=int(math.sqrt(x))

    FACT=dict()

    for i in range(2,L+2):
        while x%i==0:
            FACT[i]=FACT.get(i,0)+1
            x=x//i

    if x!=1:
        FACT[x]=FACT.get(x,0)+1

    return FACT

FX=fac(X)
FY=fac(Y)

flag=1

for fx in FX:
    if fx in FY and FX[fx]*A<FY[fx]*B:
        flag=0

for fy in FY:
    if not(fy in FX):
        flag=0

if flag==1:
    print("Yes")
else:
    print("No")
0