結果

問題 No.2682 Visible Divisible
ユーザー nikoro256nikoro256
提出日時 2024-03-22 16:40:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 272 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 105,736 KB
最終ジャッジ日時 2024-03-22 16:41:03
合計ジャッジ時間 5,878 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 254 ms
105,492 KB
testcase_01 AC 262 ms
105,400 KB
testcase_02 AC 269 ms
105,348 KB
testcase_03 AC 263 ms
105,308 KB
testcase_04 AC 272 ms
105,644 KB
testcase_05 AC 266 ms
105,640 KB
testcase_06 AC 258 ms
105,440 KB
testcase_07 AC 248 ms
104,908 KB
testcase_08 AC 36 ms
53,588 KB
testcase_09 AC 36 ms
53,588 KB
testcase_10 AC 36 ms
53,588 KB
testcase_11 AC 264 ms
105,628 KB
testcase_12 AC 268 ms
105,572 KB
testcase_13 AC 260 ms
105,736 KB
testcase_14 AC 272 ms
105,588 KB
testcase_15 AC 264 ms
104,864 KB
testcase_16 AC 266 ms
105,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N,K=map(int,input().split())
A=list(map(int,input().split()))
gcds=1
for i in range(N):
    gcds=(gcds*math.gcd(K,A[i]))//math.gcd(gcds,math.gcd(K,A[i]))
if K==gcds:
    print('Yes')
    exit(0)
print('No')
0