結果

問題 No.2682 Visible Divisible
ユーザー timitimi
提出日時 2024-03-20 23:45:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 234 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 119,532 KB
最終ジャッジ日時 2024-09-30 09:40:18
合計ジャッジ時間 4,890 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 221 ms
119,136 KB
testcase_01 AC 229 ms
118,920 KB
testcase_02 AC 225 ms
118,864 KB
testcase_03 AC 223 ms
118,832 KB
testcase_04 AC 234 ms
119,420 KB
testcase_05 AC 228 ms
119,532 KB
testcase_06 AC 219 ms
119,356 KB
testcase_07 AC 211 ms
118,680 KB
testcase_08 AC 41 ms
51,840 KB
testcase_09 AC 40 ms
52,096 KB
testcase_10 AC 41 ms
52,096 KB
testcase_11 AC 226 ms
119,288 KB
testcase_12 AC 227 ms
119,096 KB
testcase_13 AC 222 ms
118,720 KB
testcase_14 AC 228 ms
119,368 KB
testcase_15 AC 226 ms
118,520 KB
testcase_16 AC 230 ms
119,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int, input().split())
A=list(map(int, input().split()))
B=[]
import math
for a in A:
  B.append(math.gcd(a,K))

c=1
for b in B:
  a=math.gcd(b,c)
  c=b*c//a 
if c==K:
  print('Yes')
else:
  print('No')
0