結果

問題 No.2682 Visible Divisible
ユーザー tute7627
提出日時 2023-12-16 02:20:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 201 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 82,340 KB
実行使用メモリ 111,376 KB
最終ジャッジ日時 2024-09-27 07:15:47
合計ジャッジ時間 4,003 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import lcm


n, k = map(int, input().split())
a = list(map(int,input().split()))
x = 1
for v in a:
    x = lcm(x, v)
    x %= k

if x % k == 0:
    print("Yes")
else:
    print("No")
0