結果

問題 No.2682 Visible Divisible
ユーザー shobonvipshobonvip
提出日時 2024-03-20 21:56:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 205 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 105,616 KB
最終ジャッジ日時 2024-03-20 21:56:59
合計ジャッジ時間 4,643 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 192 ms
105,500 KB
testcase_01 AC 201 ms
105,404 KB
testcase_02 AC 202 ms
105,352 KB
testcase_03 AC 198 ms
105,316 KB
testcase_04 AC 205 ms
105,524 KB
testcase_05 AC 201 ms
105,476 KB
testcase_06 AC 196 ms
105,320 KB
testcase_07 AC 190 ms
104,908 KB
testcase_08 AC 38 ms
53,588 KB
testcase_09 AC 36 ms
53,588 KB
testcase_10 AC 37 ms
53,588 KB
testcase_11 AC 203 ms
105,508 KB
testcase_12 AC 202 ms
105,444 KB
testcase_13 AC 196 ms
105,616 KB
testcase_14 AC 202 ms
105,468 KB
testcase_15 AC 202 ms
104,872 KB
testcase_16 AC 204 ms
105,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n, k = map(int,input().split())
a = list(map(int,input().split()))
d = 1

for i in range(n):
	g = math.gcd(a[i], k)
	d = d // math.gcd(g, d) * g

if d == k:
	print("Yes")
else:
	print("No")
0