結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-10-29 21:30:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 646 bytes
コンパイル時間 400 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 58,624 KB
最終ジャッジ日時 2024-04-16 14:10:37
合計ジャッジ時間 5,182 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
58,240 KB
testcase_01 AC 67 ms
57,856 KB
testcase_02 AC 72 ms
57,600 KB
testcase_03 AC 67 ms
58,112 KB
testcase_04 AC 73 ms
58,240 KB
testcase_05 AC 67 ms
58,112 KB
testcase_06 AC 72 ms
58,368 KB
testcase_07 AC 66 ms
58,368 KB
testcase_08 AC 65 ms
58,104 KB
testcase_09 AC 67 ms
57,600 KB
testcase_10 AC 69 ms
57,856 KB
testcase_11 AC 67 ms
58,368 KB
testcase_12 AC 72 ms
58,496 KB
testcase_13 AC 68 ms
57,600 KB
testcase_14 AC 68 ms
58,240 KB
testcase_15 AC 70 ms
57,984 KB
testcase_16 AC 68 ms
57,856 KB
testcase_17 AC 67 ms
58,240 KB
testcase_18 AC 67 ms
58,240 KB
testcase_19 AC 66 ms
58,240 KB
testcase_20 AC 67 ms
57,984 KB
testcase_21 AC 65 ms
57,728 KB
testcase_22 AC 71 ms
58,624 KB
testcase_23 AC 68 ms
58,240 KB
testcase_24 AC 65 ms
58,240 KB
testcase_25 AC 68 ms
58,240 KB
testcase_26 AC 66 ms
58,112 KB
testcase_27 AC 68 ms
57,728 KB
testcase_28 AC 66 ms
58,240 KB
testcase_29 AC 66 ms
57,600 KB
testcase_30 AC 66 ms
57,856 KB
testcase_31 AC 67 ms
58,368 KB
testcase_32 AC 65 ms
57,856 KB
testcase_33 AC 64 ms
58,232 KB
testcase_34 AC 68 ms
57,984 KB
testcase_35 AC 72 ms
57,984 KB
testcase_36 AC 68 ms
58,368 KB
testcase_37 AC 67 ms
58,368 KB
testcase_38 AC 65 ms
57,856 KB
testcase_39 AC 63 ms
57,856 KB
testcase_40 AC 65 ms
58,240 KB
testcase_41 AC 67 ms
57,600 KB
testcase_42 AC 66 ms
57,600 KB
testcase_43 AC 66 ms
58,220 KB
testcase_44 AC 67 ms
57,856 KB
testcase_45 AC 69 ms
57,984 KB
testcase_46 AC 68 ms
58,112 KB
testcase_47 AC 67 ms
58,496 KB
testcase_48 AC 68 ms
58,112 KB
testcase_49 AC 67 ms
58,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

X,Y をそれぞれ素因数分解すればおk

"""

import sys
from sys import stdin

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

XD = {}
YD = {}

for i in range(2,10**6+1):

    if X % i == 0:
        XD[i] = 0

        while X % i == 0:
            XD[i] += 1
            X //= i

if X != 1:
    XD[X] = 1

for i in XD:
    XD[i] *= A



for i in range(2,10**6+1):

    if Y % i == 0:
        YD[i] = 0

        while Y % i == 0:
            YD[i] += 1
            Y //= i
if Y != 1:
    YD[Y] = 1
for i in YD:
    YD[i] *= B

ans = "Yes"
for i in YD:
    if i not in XD or XD[i] < YD[i]:
        ans = "No"
        break

print (ans)
0