結果

問題 No.2682 Visible Divisible
ユーザー noriocnorioc
提出日時 2024-03-20 23:49:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 233 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 216 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 107,284 KB
最終ジャッジ日時 2024-03-20 23:49:29
合計ジャッジ時間 4,820 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 197 ms
107,164 KB
testcase_01 AC 229 ms
107,076 KB
testcase_02 AC 206 ms
107,016 KB
testcase_03 AC 203 ms
106,956 KB
testcase_04 AC 215 ms
107,192 KB
testcase_05 AC 210 ms
107,188 KB
testcase_06 AC 202 ms
107,116 KB
testcase_07 AC 222 ms
106,576 KB
testcase_08 AC 37 ms
53,460 KB
testcase_09 AC 36 ms
53,460 KB
testcase_10 AC 38 ms
53,460 KB
testcase_11 AC 202 ms
107,176 KB
testcase_12 AC 209 ms
107,116 KB
testcase_13 AC 202 ms
107,284 KB
testcase_14 AC 202 ms
107,136 KB
testcase_15 AC 233 ms
106,540 KB
testcase_16 AC 212 ms
107,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd, lcm

N, K = map(int, input().split())
A = list(map(int, input().split()))

x = 1
for a in [gcd(K, a) for a in A]:
    x = lcm(x, a)

if x % K == 0:
    print('Yes')
else:
    print('No')
0