結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー SidewaysOwl
提出日時 2021-10-29 21:41:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 404 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 60,544 KB
最終ジャッジ日時 2024-10-07 10:30:53
合計ジャッジ時間 4,499 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36 WA * 14
権限があれば一括ダウンロードができます

ソースコード

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]:
            flg = "No"
    else:
        ans = "No"
print(ans)
0