結果

問題 No.2682 Visible Divisible
ユーザー ntudantuda
提出日時 2024-03-24 19:33:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 214 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 3,270 ms
コンパイル使用メモリ 81,444 KB
実行使用メモリ 105,716 KB
最終ジャッジ日時 2024-03-24 19:35:50
合計ジャッジ時間 12,031 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 187 ms
105,600 KB
testcase_01 AC 190 ms
105,508 KB
testcase_02 AC 194 ms
105,452 KB
testcase_03 AC 191 ms
105,416 KB
testcase_04 AC 204 ms
105,624 KB
testcase_05 AC 197 ms
105,620 KB
testcase_06 AC 190 ms
105,428 KB
testcase_07 AC 182 ms
105,016 KB
testcase_08 AC 32 ms
53,460 KB
testcase_09 AC 32 ms
53,460 KB
testcase_10 AC 33 ms
53,460 KB
testcase_11 AC 190 ms
105,612 KB
testcase_12 AC 199 ms
105,548 KB
testcase_13 AC 214 ms
105,716 KB
testcase_14 AC 194 ms
105,568 KB
testcase_15 AC 191 ms
104,980 KB
testcase_16 AC 199 ms
105,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import *
N,K = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N):
    A[i] = gcd(A[i],K)
tmp = 1
for a in A:
    tmp = lcm(tmp,a)
if tmp % K == 0:
    print("Yes")
else:
    print("No")
0