結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 201 ms
118,928 KB
testcase_01 AC 206 ms
118,964 KB
testcase_02 AC 239 ms
118,900 KB
testcase_03 AC 211 ms
118,872 KB
testcase_04 AC 216 ms
119,080 KB
testcase_05 AC 213 ms
119,068 KB
testcase_06 AC 205 ms
119,008 KB
testcase_07 AC 197 ms
118,332 KB
testcase_08 AC 37 ms
53,588 KB
testcase_09 AC 36 ms
53,588 KB
testcase_10 AC 38 ms
53,588 KB
testcase_11 AC 207 ms
118,936 KB
testcase_12 AC 213 ms
119,128 KB
testcase_13 AC 210 ms
118,504 KB
testcase_14 AC 212 ms
118,896 KB
testcase_15 AC 209 ms
118,296 KB
testcase_16 AC 225 ms
119,100 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