結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 249 ms
110,308 KB
testcase_01 AC 236 ms
110,472 KB
testcase_02 AC 206 ms
110,544 KB
testcase_03 AC 214 ms
110,632 KB
testcase_04 AC 142 ms
110,200 KB
testcase_05 AC 178 ms
110,192 KB
testcase_06 AC 215 ms
110,516 KB
testcase_07 AC 280 ms
109,204 KB
testcase_08 AC 36 ms
53,460 KB
testcase_09 AC 36 ms
53,460 KB
testcase_10 AC 36 ms
53,460 KB
testcase_11 AC 218 ms
110,192 KB
testcase_12 AC 242 ms
110,380 KB
testcase_13 WA -
testcase_14 AC 191 ms
110,272 KB
testcase_15 AC 205 ms
109,172 KB
testcase_16 AC 150 ms
110,224 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 = K
for a in A:
  g = gcd(g,a)

for i in range(N):
  A[i] //= g
K //= g

for a in A:
  g = gcd(K,a)
  K //= g

if K == 1:
  print('Yes')
else:
  print('No')
0