結果

問題 No.2682 Visible Divisible
ユーザー hir355hir355
提出日時 2024-03-21 00:06:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 211 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 105,824 KB
最終ジャッジ日時 2024-09-30 09:44:57
合計ジャッジ時間 4,518 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 198 ms
105,464 KB
testcase_01 AC 201 ms
105,252 KB
testcase_02 AC 209 ms
105,200 KB
testcase_03 AC 201 ms
105,152 KB
testcase_04 AC 207 ms
105,492 KB
testcase_05 AC 204 ms
105,480 KB
testcase_06 AC 190 ms
105,016 KB
testcase_07 AC 199 ms
105,120 KB
testcase_08 AC 38 ms
51,712 KB
testcase_09 AC 38 ms
51,584 KB
testcase_10 AC 41 ms
51,712 KB
testcase_11 AC 207 ms
105,736 KB
testcase_12 AC 206 ms
105,296 KB
testcase_13 AC 201 ms
105,044 KB
testcase_14 AC 211 ms
105,824 KB
testcase_15 AC 206 ms
104,968 KB
testcase_16 AC 208 ms
105,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

n, k = map(int, input().split())
a = list(map(int, input().split()))
l = 1
for x in a:
    g = gcd(k, x)
    l = l * g // gcd(l, g)
if l == k:
    print('Yes')
else:
    print('No')

0