結果

問題 No.2682 Visible Divisible
ユーザー PNJPNJ
提出日時 2024-03-20 21:28:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 111,036 KB
最終ジャッジ日時 2024-09-30 07:17:27
合計ジャッジ時間 6,938 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
110,416 KB
testcase_01 AC 551 ms
110,580 KB
testcase_02 AC 628 ms
111,036 KB
testcase_03 AC 381 ms
110,364 KB
testcase_04 AC 368 ms
110,440 KB
testcase_05 AC 329 ms
110,556 KB
testcase_06 AC 286 ms
110,880 KB
testcase_07 AC 244 ms
109,364 KB
testcase_08 AC 37 ms
51,200 KB
testcase_09 AC 38 ms
51,712 KB
testcase_10 AC 37 ms
51,712 KB
testcase_11 WA -
testcase_12 AC 314 ms
110,760 KB
testcase_13 AC 306 ms
110,152 KB
testcase_14 WA -
testcase_15 AC 378 ms
109,616 KB
testcase_16 AC 354 ms
110,644 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