結果

問題 No.2682 Visible Divisible
ユーザー pitPpitP
提出日時 2024-03-20 21:34:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 107,252 KB
最終ジャッジ日時 2024-03-20 21:34:49
合計ジャッジ時間 5,240 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 275 ms
107,012 KB
testcase_01 AC 252 ms
106,916 KB
testcase_02 AC 242 ms
106,864 KB
testcase_03 AC 245 ms
106,828 KB
testcase_04 AC 233 ms
107,160 KB
testcase_05 AC 257 ms
107,156 KB
testcase_06 AC 248 ms
106,964 KB
testcase_07 AC 247 ms
106,420 KB
testcase_08 AC 36 ms
53,588 KB
testcase_09 AC 35 ms
53,588 KB
testcase_10 AC 36 ms
53,588 KB
testcase_11 AC 243 ms
106,976 KB
testcase_12 AC 256 ms
107,088 KB
testcase_13 WA -
testcase_14 AC 239 ms
106,976 KB
testcase_15 AC 237 ms
106,392 KB
testcase_16 AC 235 ms
107,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
N, K = map(int, input().split())
A = list(map(int, input().split()))
g = A[0]
for i in range(N): 
    g = gcd(g, A[i])

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

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

print("Yes" if K == 1 else "No")
0