結果

問題 No.2682 Visible Divisible
ユーザー PNJPNJ
提出日時 2024-03-20 21:28:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 110,560 KB
最終ジャッジ日時 2024-03-20 21:29:08
合計ジャッジ時間 7,676 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 309 ms
110,068 KB
testcase_01 AC 636 ms
110,492 KB
testcase_02 AC 709 ms
110,560 KB
testcase_03 AC 388 ms
110,396 KB
testcase_04 AC 401 ms
110,092 KB
testcase_05 AC 345 ms
110,084 KB
testcase_06 AC 307 ms
110,536 KB
testcase_07 AC 249 ms
108,968 KB
testcase_08 AC 38 ms
53,460 KB
testcase_09 AC 37 ms
53,460 KB
testcase_10 AC 37 ms
53,460 KB
testcase_11 WA -
testcase_12 AC 355 ms
110,272 KB
testcase_13 AC 322 ms
109,936 KB
testcase_14 WA -
testcase_15 AC 416 ms
109,060 KB
testcase_16 AC 368 ms
110,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def Map():
  return list(map(int,input().split()))

def gcd(a, b):
  while a != 0:
    b %= a
    if b == 0: return a
    a %= b
  return b

N,K = Map()
A = Map()

g = 1
for a in A:
  gg = gcd(g,a)
  a //= gg
  gg = gcd(a,K)
  g *= gg
if g == K:
  print('Yes')
else:
  print('No')
0