結果

問題 No.2682 Visible Divisible
ユーザー とりゐとりゐ
提出日時 2024-03-20 21:20:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 288 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 110,696 KB
最終ジャッジ日時 2024-03-20 21:20:34
合計ジャッジ時間 4,941 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 255 ms
105,632 KB
testcase_01 AC 286 ms
110,404 KB
testcase_02 AC 282 ms
110,476 KB
testcase_03 AC 288 ms
110,696 KB
testcase_04 AC 127 ms
105,524 KB
testcase_05 AC 160 ms
105,528 KB
testcase_06 AC 206 ms
105,328 KB
testcase_07 AC 242 ms
104,916 KB
testcase_08 AC 37 ms
53,588 KB
testcase_09 AC 37 ms
53,588 KB
testcase_10 AC 36 ms
53,588 KB
testcase_11 AC 246 ms
110,380 KB
testcase_12 AC 259 ms
110,448 KB
testcase_13 AC 253 ms
109,432 KB
testcase_14 AC 232 ms
110,208 KB
testcase_15 AC 254 ms
109,100 KB
testcase_16 AC 135 ms
105,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n,k=map(int,input().split())
a=list(map(int,input().split()))
g=1
for i in a:
  g=math.gcd(k,g*i//math.gcd(g,i))
  if k==g:
    print("Yes")
    exit()

print("No")
0