結果

問題 No.2682 Visible Divisible
ユーザー だれ
提出日時 2023-12-15 21:06:28
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 295 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 34,952 KB
最終ジャッジ日時 2024-09-27 06:30:05
合計ジャッジ時間 5,528 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd, lcm

n, k = map(int, input().split())
a = list(map(int, input().split()))
l = 1
for i in a:
    i = gcd(i, k)
    l = lcm(i, l)
print("Yes" if l == k else "No")
0