結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー rlangevinrlangevin
提出日時 2023-01-01 02:23:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 634 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 77,312 KB
最終ジャッジ日時 2023-08-17 22:59:30
合計ジャッジ時間 8,444 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
72,200 KB
testcase_01 AC 94 ms
72,108 KB
testcase_02 AC 93 ms
71,736 KB
testcase_03 AC 120 ms
77,000 KB
testcase_04 AC 125 ms
76,652 KB
testcase_05 AC 119 ms
77,040 KB
testcase_06 AC 123 ms
76,824 KB
testcase_07 AC 119 ms
76,792 KB
testcase_08 AC 128 ms
76,896 KB
testcase_09 AC 121 ms
76,748 KB
testcase_10 AC 123 ms
76,976 KB
testcase_11 AC 119 ms
76,756 KB
testcase_12 AC 126 ms
76,824 KB
testcase_13 AC 125 ms
77,020 KB
testcase_14 AC 106 ms
77,084 KB
testcase_15 AC 120 ms
76,860 KB
testcase_16 AC 125 ms
76,952 KB
testcase_17 AC 122 ms
76,936 KB
testcase_18 AC 123 ms
77,020 KB
testcase_19 AC 115 ms
76,776 KB
testcase_20 AC 115 ms
76,792 KB
testcase_21 AC 118 ms
76,916 KB
testcase_22 AC 119 ms
77,312 KB
testcase_23 AC 127 ms
76,660 KB
testcase_24 AC 115 ms
76,752 KB
testcase_25 AC 127 ms
76,888 KB
testcase_26 AC 122 ms
76,924 KB
testcase_27 AC 123 ms
76,828 KB
testcase_28 AC 119 ms
76,760 KB
testcase_29 AC 124 ms
76,936 KB
testcase_30 AC 128 ms
76,932 KB
testcase_31 AC 122 ms
76,652 KB
testcase_32 AC 122 ms
76,912 KB
testcase_33 AC 128 ms
76,908 KB
testcase_34 AC 131 ms
76,900 KB
testcase_35 AC 128 ms
76,864 KB
testcase_36 AC 129 ms
76,904 KB
testcase_37 AC 93 ms
71,868 KB
testcase_38 AC 94 ms
71,960 KB
testcase_39 AC 90 ms
71,452 KB
testcase_40 AC 115 ms
76,820 KB
testcase_41 AC 93 ms
71,752 KB
testcase_42 AC 93 ms
72,072 KB
testcase_43 AC 93 ms
72,124 KB
testcase_44 AC 94 ms
72,040 KB
testcase_45 AC 115 ms
77,036 KB
testcase_46 AC 118 ms
77,292 KB
testcase_47 AC 118 ms
76,732 KB
testcase_48 AC 97 ms
76,980 KB
testcase_49 AC 104 ms
76,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    return arr


X, A, Y, B = map(int, input().split())
DX, DY = defaultdict(int), defaultdict(int)
LX, LY = factorization(X), factorization(Y)
for n, ind in LX:
    DX[n] = ind * A
for n, ind in LY:
    DY[n] = ind * B
    
for k, v in DY.items():
    if v > DX[k]:
        print("No")
        exit()
print("Yes")
0