結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-10-29 21:45:18
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 270 ms / 2,000 ms
コード長 622 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 77,700 KB
最終ジャッジ日時 2023-07-29 07:32:42
合計ジャッジ時間 8,540 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
72,340 KB
testcase_01 AC 88 ms
71,852 KB
testcase_02 AC 88 ms
72,108 KB
testcase_03 AC 99 ms
77,396 KB
testcase_04 AC 175 ms
77,392 KB
testcase_05 AC 115 ms
77,684 KB
testcase_06 AC 97 ms
77,260 KB
testcase_07 AC 93 ms
77,240 KB
testcase_08 AC 113 ms
77,392 KB
testcase_09 AC 95 ms
77,444 KB
testcase_10 AC 118 ms
77,392 KB
testcase_11 AC 95 ms
77,596 KB
testcase_12 AC 100 ms
77,268 KB
testcase_13 AC 92 ms
77,264 KB
testcase_14 AC 95 ms
77,388 KB
testcase_15 AC 212 ms
77,700 KB
testcase_16 AC 124 ms
77,252 KB
testcase_17 AC 224 ms
77,396 KB
testcase_18 AC 153 ms
77,336 KB
testcase_19 AC 129 ms
77,568 KB
testcase_20 AC 112 ms
77,216 KB
testcase_21 AC 159 ms
77,592 KB
testcase_22 AC 114 ms
77,448 KB
testcase_23 AC 123 ms
77,388 KB
testcase_24 AC 94 ms
77,232 KB
testcase_25 AC 157 ms
77,352 KB
testcase_26 AC 109 ms
77,524 KB
testcase_27 AC 96 ms
77,392 KB
testcase_28 AC 168 ms
77,236 KB
testcase_29 AC 151 ms
77,236 KB
testcase_30 AC 211 ms
77,236 KB
testcase_31 AC 148 ms
77,468 KB
testcase_32 AC 110 ms
77,120 KB
testcase_33 AC 92 ms
72,100 KB
testcase_34 AC 96 ms
72,076 KB
testcase_35 AC 91 ms
72,224 KB
testcase_36 AC 270 ms
77,524 KB
testcase_37 AC 90 ms
72,224 KB
testcase_38 AC 90 ms
71,492 KB
testcase_39 AC 90 ms
71,684 KB
testcase_40 AC 90 ms
72,056 KB
testcase_41 AC 89 ms
71,924 KB
testcase_42 AC 90 ms
72,124 KB
testcase_43 AC 92 ms
71,976 KB
testcase_44 AC 93 ms
72,076 KB
testcase_45 AC 90 ms
72,224 KB
testcase_46 AC 92 ms
71,900 KB
testcase_47 AC 92 ms
72,172 KB
testcase_48 AC 91 ms
71,752 KB
testcase_49 AC 91 ms
72,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def prime_factorization(w,d):
    cnt = 2
    while w > 1:
        if cnt > int(w ** (1/2)):
            d[w] += 1
            break
        while w % cnt == 0:
            d[cnt] += 1
            w //= cnt
        cnt += 1
x,a,y,b = map(int,input().split())
from collections import defaultdict
d1 = defaultdict(int)
d2 = defaultdict(int)
prime_factorization(x,d1)
prime_factorization(y,d2)
ans = "Yes"
def kake(d,xx):
    for k in d.keys():
        d[k] *= xx
# print(d1,d2)
kake(d1,a)
kake(d2,b)
for k in d2.keys():
    if k in d1:
        if d1[k] < d2[k]:
            ans = "No"
    else:
        ans = "No"
print(ans)
0