結果

問題 No.2682 Visible Divisible
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2023-12-16 13:37:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 226 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 105,832 KB
最終ジャッジ日時 2023-12-16 13:39:10
合計ジャッジ時間 4,648 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 189 ms
105,588 KB
testcase_01 AC 194 ms
105,500 KB
testcase_02 AC 226 ms
105,440 KB
testcase_03 AC 197 ms
105,404 KB
testcase_04 AC 206 ms
105,740 KB
testcase_05 AC 202 ms
105,736 KB
testcase_06 AC 197 ms
105,544 KB
testcase_07 AC 189 ms
105,000 KB
testcase_08 AC 37 ms
53,588 KB
testcase_09 AC 36 ms
53,588 KB
testcase_10 AC 35 ms
53,588 KB
testcase_11 AC 196 ms
105,600 KB
testcase_12 AC 199 ms
105,668 KB
testcase_13 AC 194 ms
105,832 KB
testcase_14 AC 202 ms
105,560 KB
testcase_15 AC 196 ms
104,968 KB
testcase_16 AC 203 ms
105,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

AC解

"""

import math

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

assert 1 <= N <= 2*(10**5)
assert 1 <= K <= 10**18
assert len(A) == N
for a in A:
    assert 1 <= a <= 10**18

X = 1

for a in A:

    g = math.gcd(a,K)
    X = g * X // math.gcd(g,X)

if X == K:
    print ("Yes")
else:
    print ("No")
0