結果

問題 No.2682 Visible Divisible
ユーザー shift_aaa
提出日時 2024-03-21 00:23:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 409 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-30 09:47:43
合計ジャッジ時間 2,289 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from sympy import factorint

n,k = map(int,input().split(' '))
a = map(lambda ai: factorint(int(ai)),input().split(' '))
powers = dict()
for ai in a:
    for (p,e) in ai.items():
        if p not in powers.keys():
            powers[p] = 0
        powers[p] = max(powers[p],e)

for (p,e) in factorint(k).items():
    if p not in powers.keys() or powers[p] < e:
        print("No")
        exit()

print("Yes")
0