結果

問題 No.2682 Visible Divisible
ユーザー だれだれ
提出日時 2023-12-15 21:06:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 303 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 37,284 KB
最終ジャッジ日時 2023-12-15 21:06:34
合計ジャッジ時間 5,942 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 299 ms
34,516 KB
testcase_01 AC 300 ms
34,820 KB
testcase_02 AC 293 ms
35,076 KB
testcase_03 AC 298 ms
35,144 KB
testcase_04 AC 303 ms
36,556 KB
testcase_05 AC 291 ms
34,472 KB
testcase_06 AC 287 ms
37,284 KB
testcase_07 AC 273 ms
35,964 KB
testcase_08 AC 28 ms
9,984 KB
testcase_09 AC 27 ms
9,984 KB
testcase_10 AC 30 ms
9,984 KB
testcase_11 AC 292 ms
36,692 KB
testcase_12 AC 293 ms
34,740 KB
testcase_13 AC 284 ms
36,260 KB
testcase_14 AC 299 ms
34,716 KB
testcase_15 AC 302 ms
36,108 KB
testcase_16 AC 290 ms
36,548 KB
権限があれば一括ダウンロードができます

ソースコード

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