結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-10-29 21:41:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,452 KB
実行使用メモリ 62,256 KB
最終ジャッジ日時 2024-04-16 14:26:06
合計ジャッジ時間 4,365 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,504 KB
testcase_01 AC 42 ms
53,632 KB
testcase_02 AC 42 ms
53,888 KB
testcase_03 AC 48 ms
60,288 KB
testcase_04 AC 93 ms
60,544 KB
testcase_05 AC 59 ms
59,904 KB
testcase_06 AC 48 ms
60,160 KB
testcase_07 AC 46 ms
60,544 KB
testcase_08 AC 57 ms
59,904 KB
testcase_09 WA -
testcase_10 AC 62 ms
60,032 KB
testcase_11 AC 46 ms
60,160 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 114 ms
59,904 KB
testcase_16 AC 63 ms
60,288 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 67 ms
60,288 KB
testcase_20 WA -
testcase_21 AC 82 ms
59,776 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 87 ms
59,904 KB
testcase_26 AC 57 ms
60,416 KB
testcase_27 AC 45 ms
60,032 KB
testcase_28 WA -
testcase_29 AC 78 ms
60,544 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 53 ms
60,416 KB
testcase_33 AC 42 ms
53,632 KB
testcase_34 AC 41 ms
54,144 KB
testcase_35 WA -
testcase_36 AC 146 ms
60,416 KB
testcase_37 AC 42 ms
54,016 KB
testcase_38 AC 46 ms
53,504 KB
testcase_39 AC 42 ms
53,120 KB
testcase_40 AC 42 ms
53,504 KB
testcase_41 WA -
testcase_42 AC 41 ms
53,760 KB
testcase_43 AC 42 ms
53,504 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 42 ms
53,504 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"
for k in d2.keys():
    if k in d1:
        if d1[k] < d2[k]:
            ans = "No"
    else:
        ans = "No"
print(ans)
0