結果

問題 No.1395 Less Sweet Alchemy
ユーザー O2MTO2MT
提出日時 2021-02-14 22:18:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 86,548 KB
実行使用メモリ 71,512 KB
最終ジャッジ日時 2023-09-29 15:55:24
合計ジャッジ時間 2,200 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,340 KB
testcase_01 AC 69 ms
71,404 KB
testcase_02 AC 70 ms
71,080 KB
testcase_03 AC 69 ms
71,312 KB
testcase_04 AC 70 ms
71,160 KB
testcase_05 AC 70 ms
70,796 KB
testcase_06 AC 69 ms
71,376 KB
testcase_07 AC 69 ms
71,352 KB
testcase_08 AC 70 ms
71,196 KB
testcase_09 WA -
testcase_10 AC 70 ms
70,752 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

N,X = map(int,input().split())
C = list(map(int,input().split()))
lc = C[0]
for i in range(1,N):
    lc = lcm(lc,C[i])
M = lc/X
if M.is_integer():
    M = int(M)
    if M >= N:
        print("Yes")
    else:
        print("No")
else:
    print("No")
0