結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-10-29 21:30:29
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 646 bytes
コンパイル時間 424 ms
コンパイル使用メモリ 87,348 KB
実行使用メモリ 76,308 KB
最終ジャッジ日時 2023-07-29 07:08:13
合計ジャッジ時間 6,568 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
75,636 KB
testcase_01 AC 94 ms
75,848 KB
testcase_02 AC 94 ms
75,676 KB
testcase_03 AC 94 ms
75,804 KB
testcase_04 AC 90 ms
75,868 KB
testcase_05 AC 90 ms
75,632 KB
testcase_06 AC 95 ms
75,876 KB
testcase_07 AC 90 ms
75,864 KB
testcase_08 AC 91 ms
75,804 KB
testcase_09 AC 91 ms
75,644 KB
testcase_10 AC 93 ms
75,824 KB
testcase_11 AC 92 ms
75,668 KB
testcase_12 AC 95 ms
76,308 KB
testcase_13 AC 92 ms
75,780 KB
testcase_14 AC 91 ms
75,920 KB
testcase_15 AC 89 ms
75,820 KB
testcase_16 AC 89 ms
76,212 KB
testcase_17 AC 88 ms
75,800 KB
testcase_18 AC 90 ms
75,800 KB
testcase_19 AC 91 ms
76,208 KB
testcase_20 AC 90 ms
75,908 KB
testcase_21 AC 92 ms
75,640 KB
testcase_22 AC 93 ms
76,120 KB
testcase_23 AC 91 ms
75,864 KB
testcase_24 AC 93 ms
75,852 KB
testcase_25 AC 91 ms
75,680 KB
testcase_26 AC 90 ms
75,868 KB
testcase_27 AC 92 ms
75,968 KB
testcase_28 AC 89 ms
75,884 KB
testcase_29 AC 91 ms
75,920 KB
testcase_30 AC 92 ms
75,808 KB
testcase_31 AC 92 ms
75,928 KB
testcase_32 AC 91 ms
76,196 KB
testcase_33 AC 91 ms
75,860 KB
testcase_34 AC 94 ms
75,824 KB
testcase_35 AC 90 ms
75,848 KB
testcase_36 AC 87 ms
75,720 KB
testcase_37 AC 91 ms
75,640 KB
testcase_38 AC 90 ms
75,728 KB
testcase_39 AC 88 ms
75,756 KB
testcase_40 AC 90 ms
75,916 KB
testcase_41 AC 89 ms
75,876 KB
testcase_42 AC 91 ms
75,756 KB
testcase_43 AC 93 ms
75,644 KB
testcase_44 AC 91 ms
75,644 KB
testcase_45 AC 101 ms
75,844 KB
testcase_46 AC 96 ms
75,852 KB
testcase_47 AC 91 ms
75,808 KB
testcase_48 AC 92 ms
75,656 KB
testcase_49 AC 95 ms
75,968 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