結果

問題 No.2682 Visible Divisible
ユーザー tassei903tassei903
提出日時 2024-03-20 21:50:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 559 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 105,948 KB
最終ジャッジ日時 2024-03-20 21:50:39
合計ジャッジ時間 4,673 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 197 ms
105,368 KB
testcase_01 AC 201 ms
105,268 KB
testcase_02 AC 205 ms
105,212 KB
testcase_03 AC 201 ms
105,180 KB
testcase_04 AC 209 ms
105,516 KB
testcase_05 AC 205 ms
105,516 KB
testcase_06 AC 200 ms
105,316 KB
testcase_07 AC 189 ms
104,780 KB
testcase_08 AC 37 ms
53,588 KB
testcase_09 AC 36 ms
53,588 KB
testcase_10 AC 37 ms
53,588 KB
testcase_11 AC 205 ms
105,500 KB
testcase_12 AC 206 ms
105,948 KB
testcase_13 AC 198 ms
105,608 KB
testcase_14 AC 208 ms
105,460 KB
testcase_15 AC 202 ms
105,532 KB
testcase_16 AC 206 ms
105,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
n,k = na()
a = na()
from math import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
z = 1
for i in range(n):
    g = gcd(a[i],k)
    z = lcm(z, g)

if z == k:
    print("Yes")
else:
    print("No")
    
0