結果

問題 No.2682 Visible Divisible
ユーザー 👑 tipstar0125tipstar0125
提出日時 2024-03-21 09:32:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 235 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 105,720 KB
最終ジャッジ日時 2024-03-21 09:32:06
合計ジャッジ時間 5,299 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 197 ms
105,480 KB
testcase_01 AC 203 ms
105,384 KB
testcase_02 AC 207 ms
105,328 KB
testcase_03 AC 205 ms
105,296 KB
testcase_04 AC 214 ms
105,612 KB
testcase_05 AC 231 ms
105,624 KB
testcase_06 AC 203 ms
105,432 KB
testcase_07 AC 197 ms
104,888 KB
testcase_08 AC 39 ms
53,588 KB
testcase_09 AC 38 ms
53,588 KB
testcase_10 AC 47 ms
53,588 KB
testcase_11 AC 207 ms
105,620 KB
testcase_12 AC 235 ms
105,548 KB
testcase_13 AC 204 ms
105,720 KB
testcase_14 AC 210 ms
105,572 KB
testcase_15 AC 207 ms
104,852 KB
testcase_16 AC 213 ms
105,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
N,K=list(map(int,input().split()))
A=list(map(int,input().split()))

def lcm(a,b):return a*b//gcd(a,b)

for i in range(N):
    A[i]=gcd(K,A[i])

l=1
for a in A:
    l=lcm(l,a)

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